permaculture playing cards
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 Java Interview Guide this week in the Jobs Discussion 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 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
I agree. Here's the link:
subject: Getting properties from ResourceBundle
jQuery in Action, 3rd edition