Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet not running  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trying to run this applet and am getting this error message: Exception in thread "pool-1-thread-1" java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")

I'm created the html file for the applet and in addition added the comment //<applet code = "NotPong.class" width = 400 height = 200> </applet> at the top of the applet. I've also tried to edit the java.policy file with the policy tool by adding  permission java.lang.RuntimePermission "modifyThreadGroup";

There shouldn't be anything wrong with the applet itself because it's from a book but I have no idea why it is not running. Any ideas?



 
Rancher
Posts: 2968
32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What program are you using to execute the applet?
It works for me in AppletViewer.
 
Saloon Keeper
Posts: 8734
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Applets are a mostly deprecated technology. Is there a good reason to keep using them? Most browsers drastically limit what an applet is allowed to do.
 
Josh Diamond
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Norm Radder wrote:What program are you using to execute the applet?
It works for me in AppletViewer.



Using appletviewer.
 
Norm Radder
Rancher
Posts: 2968
32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's in your .java.policy file?

Mine has these lines near the front:

Aother possibility: use a private policy file:

mypolicy.policy:

Command line:


"C:\Program Files\Java\jdk1.8.0_60\bin\appletviewer.exe" -J-Djava.security.policy=mypolicy.policy NotPong.java


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!