Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting properties from ResourceBundle

 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible that an application can change the classpath while running?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only, I think, by instantiating your own classloader and using that.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic