| Author |
How to specify the ResourceBundle file
|
Mullin Yu
Greenhorn
Joined: Feb 24, 2005
Posts: 14
|
|
hi, i have write a separate class to store the configuration at config.properties. but, how i can tell the java vm to use it? e.g. java testdemo import java.util.ResourceBundle; public class Resource { private static final String BUNDLE_NAME = "config";//$NON-NLS-1$ private static ResourceBundle RESOURCE_BUNDLE = ResourceBundle .getBundle(BUNDLE_NAME); ... ... }
|
 |
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
|
|
|
yup, that would work if that were indeed the name of the properties file and it were in the root of the classpath.
|
42
|
 |
 |
|
|
subject: How to specify the ResourceBundle file
|
|
|