This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Applets and the fly likes Exception in runnig applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Exception in runnig applet" Watch "Exception in runnig applet" New topic
Author

Exception in runnig applet

Krishna Priya
Greenhorn

Joined: Mar 08, 2006
Posts: 17
Hi am getting an exception when I am running an applet. The same applet runs fine with Eclipse but gives exception from the browser. following is the exception. Can somebody please help me?. I changed the init method to main and ran the application fine from dos prompt(Just to check that I have all the jar files correct).

java.lang.ExceptionInInitializerError
at cl.ui.widgets.tutorable.TutorableWidgetImpl.<clinit>(TutorableWidgetImpl.java:203)
at Widget.TabelWidget.<init>(TabelWidget.java:15)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission DEMOMODE read)
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.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.lang.Boolean.getBoolean(Unknown Source)
at cl.ui.utilities.settings.Settings.<clinit>(Settings.java:122)
... 13 more
Exception in thread "Thread-4" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "thread applet-Widget.TabelWidget.class" java.lang.NullPointerException
at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
at sun.plugin.AppletViewer.showAppletException(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42371
    
  64

Applets have fewer privileges than applications, specifically they can't access all properties. You can either digitally sign the applet, or use a policy file to get around this; see here for details.


Ping & DNS - my free Android networking tools app
Krishna Priya
Greenhorn

Joined: Mar 08, 2006
Posts: 17
Thank you very much for your help. The documentation is very helpful.
 
Consider Paul's rocket mass heater.
 
subject: Exception in runnig applet