Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes ResourceBundle to read property file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ResourceBundle to read property file" Watch "ResourceBundle to read property file" New topic
Author

ResourceBundle to read property file

naren ramanujam
Greenhorn

Joined: Jun 14, 2006
Posts: 7
i have used ResourceBundle to read property file..
when i try to run it in eclips IDE
it throwing an Exception
and that is as follow:::
Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name xxxx, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)
at pankaj.ReadProperty.<init>(ReadProperty.java:19)
at pankaj.ReadProperty.main(ReadProperty.java:25)
Java Result: 1
Mahesh Desai
Ranch Hand

Joined: Apr 04, 2007
Posts: 76
Put your property files in classpath, so that ResourceBundle load it correctly.


Thanks,
Mahesh


--------------------
SCJP 1.4 | SCWCD 1.4 | SCBCD 1.3 | SCEA Part I - In Progress
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ResourceBundle to read property file
 
Similar Threads
Problem with ResourceBundle and Weblogic
Unable to read properties file using resouce bundle
jdbc mysql problem
ResourceBundle file name problem
MissingResourceException due to class loader constellation (caller not in WEB-INF/classes)