• 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
Hi,
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 10.70.148.192:8082 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,
Surya
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic