• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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: 3353
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.
 
Bartender
Posts: 9564
189
  • 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: 3353
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


 
We don't have time to be charming! Quick, read this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!