wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes How to specify the ResourceBundle file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to specify the ResourceBundle file" Watch "How to specify the ResourceBundle file" New topic

How to specify the ResourceBundle file

Mullin Yu

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
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.

I agree. Here's the link: http://aspose.com/file-tools
subject: How to specify the ResourceBundle file
Similar Threads
Usage of Resource Bundles and Memory consumption
Can i keep a configFile in webapp?
Applet always use same Resource file
Trying to update a ResourceBundle and to refresh the swing interface
Properties File from Jar