• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use external properties in the Jar file

 
David Wei
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try adding your resource files in the classpath when you run the app
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic