Problem loading a properties file
843807Nov 2 2007 — edited Dec 11 2007I am developing an applet and I want to use a properties file in order to have some configuration data embeded
I have packaged everything in a jar file
The code I have written in the applet's init method to implement this requirement is this:
ClassLoader cl=this.getClass().getClassLoader();
InputStream is=cl.getResourceAsStream("/geom/def/base/premarc.properties");
I have also tried calling getResourceAsStream from the Class object, instead of the ClassLoader object with the same result.
In the HTML file, I have put the APPLET tag with the ARCHIVE and CODEBASE attibutes pointing to the jar file. The value is correct since I can see in the Java console my System.out instructions
The result I am getting is that the InputStream returned by getResourceAsStream is always null
Anybody could tell me what I'm doing wrong?
Thanks in advance