aspose file tools*
The moose likes Java in General and the fly likes Use external properties in the Jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Use external properties in the Jar file" Watch "Use external properties in the Jar file" New topic
Author

Use external properties in the Jar file

David Wei
Greenhorn

Joined: Jan 04, 2002
Posts: 17
Hi everybody,
I am writing a java application where I create a jar file. In this application, there are two property files. If I include those two files inside the jar file, I can successfully load them using PropertyResourceBundle(); but I would like to separate them from the jar file because I can modify them during the deployment process. When I put those properties in the same directory where the jar file is and run it, I got the Exception as follows
java.util.MissingResourceException: Can't find bundle for base name, local en_US
Could someone help me on this?
Thanks in advance
David
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
Try adding your resource files in the classpath when you run the app
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
Originally posted by Dmitry Melnik:
Try adding your resource files in the classpath when you run the app

Exactly, which you can do by specifying the directory that contains the files in the classpath (rather than each file name in the classpath) -- just in case you were going to try that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use external properties in the Jar file