This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Applets and the fly likes applet security exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "applet security exception" Watch "applet security exception" New topic

applet security exception

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
I am trying to run the applet(JApplet) from browser.I am using NetBeans hence including "swing-layout-1.0.3.jar". From NetBeans I am able to run the applet.But in browser,I am getting an exception. In HTML, I am writing this-

I am getting the following exception-

Do I need to change java.policy file in JRE directory? If yes, what should I add in it?


Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41089
It's probably easier to sign the applet, especially if you expect other people to use it as well. See for more information on both approaches; it also contains an example of the PropertyPermission required here.

Ping & DNS - my free Android networking tools app
Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
Thanks. Using keytool and jarsigner command I created keystore and certificate and was able to create Signed applet.
But when I run the applet in the browser, I am getting the same error-

I have set the contents of java.policy (jre/lib/security directory) like this-

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1874
Problem was with native implementation(of Tibco) than permission of Applet.
I agree. Here's the link:
subject: applet security exception
Similar Threads
Applet throwing exception when running it through web browser
Getting error while displaying tif image in applet through browser.
WAMP/Java/MysqlConnector Issue
Run JAR file in Applet
NoClassDefFoundError: with GroupLayout