aspose file tools
The moose likes Java in General and the fly likes ResourceBundle for properties files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "ResourceBundle for properties files" Watch "ResourceBundle for properties files" New topic
Author

ResourceBundle for properties files

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
If anyone has any insight into the following I'd love to hear it.
I have the following piece of code.
String classPath = System.getProperty("java.class.path",".");
System.out.println("classpath here is " + classPath);
ResourceBundle bundle = ResourceBundle.getBundle("vipsvk");

Everytime I run this I get a MissingResourceException yet the classpath display shows up the directory which contains vipsvk.properties quite clearly. How is it possible that getBundle cannot find the vipsvk.properties file yet the line immediately before it shows that the correct directory is in the classpath?
Thanks for any help as this is driving me up the wall.
Payl
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ResourceBundle for properties files