java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:6789" "listen,resolve")

Stack Overflow | Shabina Rayan | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    java.security.AccessControlException: access denied (java.policy file)

    Stack Overflow | 10 months ago | Shabina Rayan
    java.security.AccessControlException: access denied ("java.net.SocketPermission" "localhost:6789" "listen,resolve")

    Root Cause Analysis

    1. java.security.AccessControlException

      access denied ("java.net.SocketPermission" "localhost:6789" "listen,resolve")

      at java.security.AccessControlContext.checkPermission()
    2. Java RT
      ServerSocket.<init>
      1. java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
      2. java.security.AccessController.checkPermission(AccessController.java:884)
      3. java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      4. java.lang.SecurityManager.checkListen(SecurityManager.java:1131)
      5. java.net.ServerSocket.bind(ServerSocket.java:374)
      6. java.net.ServerSocket.<init>(ServerSocket.java:237)
      7. java.net.ServerSocket.<init>(ServerSocket.java:128)
      7 frames
    3. server
      ServerGUI$ServerRunning.run
      1. server.Server.start(Server.java:34)
      2. server.ServerGUI$ServerRunning.run(ServerGUI.java:109)
      2 frames