File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes tomcat - read external properties file from jar Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "tomcat - read external properties file from jar" Watch "tomcat - read external properties file from jar" New topic
Author

tomcat - read external properties file from jar

Quiddo Quitch
Ranch Hand

Joined: Apr 21, 2008
Posts: 38
I created a jar (myjar.jar) file that I placed in the lib directory of my webapp. The jar file I created needs to read from a properties file that is in a different directory. When I try to specify the path to this properties file I am getting an exception.

The code I am using



Dir structure below

How can I specify the correct path?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

What exception are you getting?


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat - read external properties file from jar
 
Similar Threads
Classpath Issues with java -jar option
WSAD & JAR Files
Path to store Embedded Database files
Writing to properties file in WEB-INF
Best place for .properties file?