Lisa Boslett

Greenhorn
+ Follow
since Apr 23, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lisa Boslett

I am new to Java Web Start. I need to be able to read a file from the jar. My application has many configuration files along with some input files, and I need to be able to access them. I have tried every way that you suggest, but I keep getting a null. It cannot find the resource. I am at my wits end. I tried both the Rachel suggestions and also the Resource Loading Tutorial and I keep getting a null when I get the resource. All the examples that I see are for icons and properties.
I made sure that the file exists in the jar. I made sure that the file path was correct. I made sure I was getting the correct classloader. Any suggestions?
My signed jar file is nxm.jar and when I look inside I can see the file is:
nxm\sys\cfg\commands.cnf
The code that I am using (at this point I went back to the classloader)
...
String resourceName;
ClassLoader resourceLoader = ResourceAnchor.class.getClassLoader();
URL resourcePath = new URL( resourceLoader.getResource(resourceName) );
...
Note:
-When I printout the "resourceName" it is nxm\sys\cfg\commands.cnf
-I am on a Windows NT platform
What am I doing wrong?
Thanks in Advance,
Lisa Boslett
21 years ago