• Post Reply Bookmark Topic Watch Topic
  • New Topic

AccessControlException in Applet

Surya Kant
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While trying to run my application i am getting following exception.Does anyone know reason for this exception?

java.security.AccessControlException: access denied (java.net.SocketPermission connect,resolve)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkConnect(Unknown Source)

at sun.plugin.net.protocol.http.HttpURLConnection.checkPermission(Unknown Source)

at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)

at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at sun.plugin.net.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)

at java.net.HttpURLConnection.getResponseCode(Unknown Source)

Please let me know if know solution for this problem.

Thanks in advance,
Ulf Dittmer
Posts: 42970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets can only connect to the host from which they were served, so I am guessing the code is trying to connect to a different host. The two principal ways around this security restriction are to digitally sign the applet, or to alter the local security policy. Both ways are described here: AppletsFaq
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!