This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "ResourceBundle for properties files" Watch "ResourceBundle for properties files" New topic

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 quite clearly. How is it possible that getBundle cannot find the 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.
It is sorta covered in the JavaRanch Style Guide.
subject: ResourceBundle for properties files
It's not a secret anymore!