Click to See Complete Forum and Search --> : ResourceBoundle for .properties file


October 6th, 1999, 12:20 PM
When run following code,
ResourceBundle labels =
ResourceBundle.getBundle("LabelsBundle",currentLocale);

I got exception:
C:\clearcase\I18N>java PropertiesDemo
java.util.MissingResourceException: Can't find resource
at java.util.ResourceBundle.getObject(ResourceBundle.java:282)
...

I use jdk1.1.7B and LabelsBundle.properties is located at same directory where
class files stay. It looks like jdk throw exception when it believes there is no
LabelsBundle.class file. I thought jdk should look for property file after no
finding class file. is that true?

May I mess some thing here.

Thanks,
Hong honghsu@lucent.com