• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java applet error on webpage

 
Matthew Vaughan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code:

OnlyPic.java:








Slideshow.java:






How I display the applet:

<APPLET CODE="Slideshow.class" WIDTH=500 HEIGHT=600>

</APPLET>

Error I get on web page:


java.lang.reflect.InvocationTargetExce…
at com.sun.deploy.util.DeployAWTUtil.invoke… Source)
at sun.plugin2.applet.Plugin2Manager.runOnE… Source)
at sun.plugin2.applet.Plugin2Manager.create… Source)
at sun.plugin2.applet.Plugin2Manager$Applet… Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.io.FilePermission . read)
at java.security.AccessControlContext.check… Source)
at java.security.AccessController.checkPerm… Source)
at java.lang.SecurityManager.checkPermissio… Source)
at java.lang.SecurityManager.checkRead(Unkn… Source)
at java.io.File.list(Unknown Source)
at java.io.File.listFiles(Unknown Source)
at Slideshow.<init>(Slideshow.java:27)
at sun.reflect.NativeConstructorAccessorImp… Method)
at sun.reflect.NativeConstructorAccessorImp… Source)
at sun.reflect.DelegatingConstructorAccesso… Source)
at java.lang.reflect.Constructor.newInstanc… Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$12.run… Source)
at java.awt.event.InvocationEvent.dispatch(… Source)
at java.awt.EventQueue.dispatchEvent(Unknow… Source)
at java.awt.EventDispatchThread.pumpOneEven… Source)
at java.awt.EventDispatchThread.pumpEventsF… Source)

In the directory of the webpage, i have one picture, and the two class files for the two java files. I think it may have something to do with the fact that Slideshow.java depends on the other OnlyPic.java
 
Paul Clapham
Sheriff
Posts: 21117
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You didn't sign the applet, did you?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic