> Could you tell me where .properties file should be put in my program?
> It is put in the same folder as class calling getResourceBoundle and it
[quoted text clipped - 4 lines]
> this class resides I have put BooleanField.properties, and
> BooleanField_pl.properties.
AFAIK, say your root classpath is ./ , then you just have to do
'ResourceBundle.getBundle("BooleanField")'. When it is in a directory,
say ./resources, then you should do
'ResourceBundle.getBundle("resources.BooleanField")'. It retrieves the
location using the ClassLoader.findResource() method, so you could even
override that function and return whatever you like.
jacekfoo@gmail.com - 17 Aug 2006 19:49 GMT
> > Could you tell me where .properties file should be put in my program?
> > It is put in the same folder as class calling getResourceBoundle and it
> > still can't find these files.
> AFIK, say your root classpath is ./ , then you just have to do
> 'ResourceBundle.getBundle("BooleanField")'. When it is in a directory,
> say ./resources, then you should do
> 'ResourceBundle.getBundle("resources.BooleanField")'.
Thanks you were right!
> Could you tell me where .properties file should be put in my program?
See the following:
http://weblogs.java.net/blog/joconner/archive/2004/04/i18n_howto_reso.html
http://java.sun.com/developer/technicalArticles/Intl/ResourceBundles/
--
John O'Conner