I am sorry for the dumb question I have been trying for a while to read some XML files in my applet without having to sign it. I know it is possible. I am just not sure where my mistake is. So far my Applet runs smoothly when invoked within eclipse, but when I try to put it on a server I get a null pointer on the XML files. I made the jar file with eclipse. All the XMLs are inside and I am sure I am referencing the right path. I tried all of the methods I found here, but I just cant get around that.
InputStream in = MyClass.class.getResourceAsStream("data" +
File.separator + "settings.xml");
Document settings = docBuilder.parse(in);
This is how I am trying to read the file now. The XML is stored in a folder named data, in the same package as MyClass.
Don’t use the file separator for a string the represents a relative URL! Use
/always for URL refs. Also prefix it with another/, vis."/data/settings.xml".