This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Abilities of 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 » Beginning Java
Bookmark "Abilities of ResourceBundle" Watch "Abilities of ResourceBundle" New topic

Abilities of ResourceBundle

zaeem masood ashar
Ranch Hand

Joined: Mar 17, 2001
Posts: 54
Can anyone tell me the how the ResourceBundle of the Java.util package accesses properties from a .properties file?? What exactly happens??

rani bedi
Ranch Hand

Joined: Feb 06, 2001
Posts: 358
check the API at
Suppose we have a PropertyResourceBundle ''. This ResourceBundle contains the keys 'key1' and 'key2'.
ResourceBundle resb = ResourceBundle.getBundle(test);
String keyValue1 = (String)resb.getObject(this.key1);
String keyValue2 = (String)resb.getObject(this.key2);
catch(MissingResourceException e)

Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
I agree. Here's the link:
subject: Abilities of ResourceBundle
It's not a secret anymore!