Hi Egon,
I've to move my jPCT applet in a web server (EasyPHP) context; in my current version I load my textures giving to it a path in my local drive:
File dir_texture=new File("C:/Programmi/Java_SDK/bin/textures"); String[] files_texture=dir_texture.list();
for (int i=0; i<files_texture.length; i++) {
String name_texture=files_texture[i];
if (name_texture.endsWith(".jpg")) {
texMan.addTexture(name_texture, new Texture(getDocumentBase(),"textures/"+name_texture)); }
}
Running the applet with the web server the Java Console obviously says:
java.security.AccessControlException: access denied (java.io.FilePermission textures 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 java.io.File.list(File.java:912)
at ThreeDSimApplet.init(ThreeDSimApplet.java:336)
at sun.applet.AppletPanel.run(AppletPanel.java:348)
at java.lang.Thread.run(Thread.java:536)
exist a way to load the textures in this new context considering that I've to load them automatically, I mean, loading them using a loop as in the current version?
Bye and thanks