aspose file tools*
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "Getting properties from ResourceBundle" Watch "Getting properties from ResourceBundle" New topic
Author

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