Finds resource in netbeans but the jar does not
Hi again. After the help I received earlier I was able to figure out how to grab data from a resource file and I got things to work... or so I thought.
I have the IDE netbeans, and my code there works fine, loading the resources I request. But when I do a clean compile and try to run the separate jar file, it doesn't find the resources.
Could someone take a look at and example of my code and tell me what might be wrong?
String fName = "resources/data/text_" + language + ".properties";
String resFName = fName.substring(resDir.length()- 1);
//resource data for the screen
InputStream is = getClass().getResourceAsStream(resFName);
if (is != null)
isr = new InputStreamReader(is);
isr = null;