dcsimg
Applet says file access denied
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   murthy_gandikota
Posted On:   Thursday, February 6, 2003 01:47 PM

posted the code in another thread. I compiled the code resulting in two files: PeteApplet.class and PetePanel.class. I moved the files to /usr/local/tomcat/jsp directory. I then copied the required GIF's to the same directory. The GIF's have read/write/exec permission to everyone (chmod 777 on unix). But at run time I get the following error. Please help! java.security.AccessControlException: access denied (java.io.FilePermission right1.gif read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270) at java.security.AccessController.checkPermission(AccessController.java:401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:542) at java.lang.Secu   More>>

posted the code in another thread. I compiled the code resulting in two files: PeteApplet.class and PetePanel.class. I moved the files to /usr/local/tomcat/jsp directory. I then copied the required GIF's to the same directory. The GIF's have read/write/exec permission to everyone (chmod 777 on unix). But at run time I get the following error. Please help!

			
java.security.AccessControlException: access denied (java.io.FilePermission right1.gif read)

at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)

at java.security.AccessController.checkPermission(AccessController.java:401)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)

at java.lang.SecurityManager.checkRead(SecurityManager.java:887)

at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:486)

at sun.awt.SunToolkit.getImage(SunToolkit.java:500)

at PetePanel. (PeteApplet.java:32)

at PeteApplet. (PeteApplet.java:6)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at java.lang.Class.newInstance0(Class.java:306)

at java.lang.Class.newInstance(Class.java:259)

at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)

at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)

at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)

at sun.applet.AppletPanel.run(AppletPanel.java:292)

at java.lang.Thread.run(Thread.java:536)

java.security.AccessControlException: access denied (java.io.FilePermission right1.gif read)

at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)

at java.security.AccessController.checkPermission(AccessController.java:401)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)

at java.lang.SecurityManager.checkRead(SecurityManager.java:887)

at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:486)

at sun.awt.SunToolkit.getImage(SunToolkit.java:500)

at PetePanel. (PeteApplet.java:32)

at PeteApplet. (PeteApplet.java:6)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:274)

at java.lang.Class.newInstance0(Class.java:306)

at java.lang.Class.newInstance(Class.java:259)

at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)

at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)

at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)

at sun.applet.AppletPanel.run(AppletPanel.java:292)

at java.lang.Thread.run(Thread.java:536)

   <<Less

Re: Applet says file access denied

Posted By:   James_Bayer  
Posted On:   Thursday, February 6, 2003 02:26 PM

have you made sure that you can access the pictures with a browser before you try getting your applet to do it?
About | Sitemap | Contact