Applet Denied Access Reading xml file from own Jar File

I found that applets cannot use the Java.IO.File class not even to read from their own assigned jar file - using the lwjgl applet loader and specifying the resources.jar containing the xml file. What method can I use to avoid the use of the file class?

I am concluding that the file class is giving problems from the console output:
access denied (java.io.FilePermission Resources\particleEffects\gloveCollision.xml read)
java.security.AccessControlException: access denied (java.io.FilePermission Resources\particleEffects\gloveCollision.xml read)

Thank you again and again :stuck_out_tongue:

How about:


InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("particleEffects/gloveCollision.xml");

Thanks for your help :), actually using ParticleIO.loadEmitter(string path to jar-ed resource folder) solved the problem.