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

Stack Overflow | Shabina Rayan | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

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

    Stack Overflow | 9 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