This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes resource bundle error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "resource bundle error" Watch "resource bundle error" New topic

resource bundle error

Avi Sridhar
Ranch Hand

Joined: May 31, 2007
Posts: 42
Hello All, I hope this is the right forum to post this message.

I am trying to use the ResourceBundle class to get a properties file

my code looks like this

its command line invocation.

The properties file is in the same directory as this file.

I am using Eclipse IDE.

It is giving me this error

Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name example_export, locale en_US

example_export is the properties file.

Please let me know what I am missing.

Bill Cruise
Ranch Hand

Joined: Jun 01, 2007
Posts: 148
Eclipse is probably putting your class file in a different directory. For this to work the resource bundle needs to be in the same directory as the class, not the source (.java) file. I would try running it from the command prompt. Do a dir (I'm assuming you're using Windows) in the directory to verify that the class and the resource bundle are both present.
Don't get me started about those stupid light bulbs.
subject: resource bundle error
Similar Threads
No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu
Unable to access Property file
not able to locate using ResourceBundle
ResourceBundle use in Web application
Class Path