applet running using appletviewer but not with browser
amit basak
Greenhorn
Joined: Apr 27, 2011
Posts: 3
posted
0
I'm trying run a applet program using browser, it is completely running using the appletviewer, bt when i'm using the browser only the first window is coming,
according to the program another window will open after giving my name in the 1st window bt it is not happening in case of the browser...
help me
amit basak
Greenhorn
Joined: Apr 27, 2011
Posts: 3
posted
0
in java console there is an exception , which is -
Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:2000 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.plugin2.applet.Applet2SecurityManager.checkConnect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at ConnectProcessing.<init>(ConnectProcessing.java:28)
at ConfDraw.<init>(ConfDraw.java:208)
at IntroCanvas.action(IntroCanvas.java:119)
at java.awt.Component.handleEvent(Unknown Source)
at java.awt.Window.postEvent(Unknown Source)
at java.awt.Component.postEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Ankit Tripathi
Ranch Hand
Joined: Oct 17, 2009
Posts: 175
posted
1
Have you checked your browser for security settings? Applets are by default considered 'unsafe' by JVM. Go through the link-http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html. Must be of great use for you........
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35224
7
posted
0
Applets can only make network connections to the host where they're served from; I'm guessing you're not using an "http://127.0.0.1..." URL to access the applet.