• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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?



 
Master Rancher
Posts: 3276
33
  • 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: 9239
177
  • 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
Master Rancher
Posts: 3276
33
  • 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


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!