• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Applet not running

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5127
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What program are you using to execute the applet?
It works for me in AppletViewer.
 
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5127
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
reply
    Bookmark Topic Watch Topic
  • New Topic