aspose file tools*
The moose likes Beginning Java and the fly likes Please help.  Jar File problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Please help. Jar File problems

rang75
Greenhorn

Joined: Jan 18, 2002
Posts: 2
Im having problems reading a properties file from outside an executable jar. If I include the properties file anywhere inside the executable jar, I have no problems. I have explicitly set the classpath to location of the properties file using the -cp option
I'm reading the properties file using the following method:
java.net.URL filePath = ClassLoader.getSystemResource(iniFileName);
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
rang75
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however, your name is not in keeping with our naming policy here at the ranch. Please re-register under an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!


Dave
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
rang75
Also, please try not to cross post your questions. Most of the people here spend time in multiple forums and will answer questions in more than one of them. Cross posting into multiple forums is a good way to show them you didn't read the forum topics or that you don't care - in the long run it is a good way to not get your questions answered. Since you asked this question in JIG (intermediate) I'm closing this one here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please help. Jar File problems