wood burning stoves 2.0*
The moose likes Java in General and the fly likes Getting properties from ResourceBundle 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 » Java in General
Bookmark "Getting properties from ResourceBundle" Watch "Getting properties from ResourceBundle" New topic

Getting properties from ResourceBundle

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
If I have a myfile.properties file in a directory that is in my classpath; why am I not finding the file with
ResourceBundle rb = ResourceBundle.getBundle("myfile");
? I get a MissingResourceException
Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
Is it possible that an application can change the classpath while running?
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Only, I think, by instantiating your own classloader and using that.
- Peter
subject: Getting properties from ResourceBundle
Similar Threads
Initizalization parameters for Apache Soap server classes?
singletoning an application
properties file using the ResourceBundle class?
how can i read from properties every thing start with foo.* ?
Sun classes.