Slick Forums
http://slick.ninjacave.com/forum/

Problem with applet java.io.FilePermission
http://slick.ninjacave.com/forum/viewtopic.php?f=1&t=6787
Page 1 of 1

Author:  Maalpa [ Sat Nov 09, 2013 10:10 pm ]
Post subject:  Problem with applet java.io.FilePermission

Hi, i have problem with running my game in applet. I always get this error

Sat Nov 09 22:40:56 CET 2013 ERROR:access denied ("java.io.FilePermission" ".\org\newdawn\slick\data\defaultfont.png" "read")
java.security.AccessControlException: access denied ("java.io.FilePermission" ".\org\newdawn\slick\data\defaultfont.png" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.File.exists(Unknown Source)
at org.newdawn.slick.util.FileSystemLocation.getResourceAsStream(FileSystemLocation.java:52)
at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(ResourceLoader.java:61)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:185)
at org.newdawn.slick.Image.<init>(Image.java:192)
at org.newdawn.slick.Image.<init>(Image.java:166)
at org.newdawn.slick.Image.<init>(Image.java:154)
at org.newdawn.slick.Image.<init>(Image.java:132)
at org.newdawn.slick.AngelCodeFont.<init>(AngelCodeFont.java:104)
at org.newdawn.slick.Graphics$1.run(Graphics.java:141)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.Graphics.<init>(Graphics.java:138)
at org.newdawn.slick.GameContainer.initSystem(GameContainer.java:759)
at org.newdawn.slick.AppletGameContainer$Container.initApplet(AppletGameContainer.java:261)
at org.newdawn.slick.AppletGameContainer$ContainerPanel.initGL(AppletGameContainer.java:229)
at org.newdawn.slick.AppletGameContainer$ContainerPanel.start(AppletGameContainer.java:216)
at org.newdawn.slick.AppletGameContainer$1.run(AppletGameContainer.java:92)

Maybe someone know how to fix this issue ?

Best Regards.
PK

Author:  TLOH45 [ Thu Mar 27, 2014 7:58 am ]
Post subject:  Re: Problem with applet java.io.FilePermission

Hi!

I'm sorry this topic is quite old, but I have the same problem and I can't figure out how to resolve it. Does anyone have a clus ?

I know that resources can't be accessed with File class inside a jar, I didn't do it with my own ressources but what if it's slick which look for its resources..

Thanks for any help!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/