aspose file tools*
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Resource Bundle Error" Watch "Resource Bundle Error" New topic
Author

Resource Bundle Error

Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
Why should i get error for example 1:C:\>java Resrf
Exception in thread "main" java.util.MissingResourceException: Can't find bundle
for base name config.properties, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source
)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at Resrf.main(Resrf.java:8)

import java.util.*;


and no error for example2:


Thanks,
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38818
    
  23
What is the exact name of the Resource? Is it config, or config.properties?
Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
the file is actually a properties file(config.properties)

when if specify base name "config.properties" as in example1 i start getting error,but when i specify it as "config" the code executes successfully.Why is it so?resource should only be a properties file?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38818
    
  23
Don't know, I am afraid, and I don't think this API link helps a lot. Sorry.

Anybody else?
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
A short tutorial explaining this.

http://theasolutions.com/java_rbundle.jsp
[ May 19, 2008: Message edited by: karthi keyan ]

http://www.skillassert.com


Rohan Kalbhor
Ranch Hand

Joined: Aug 18, 2006
Posts: 78
make sure your specified path is correct and if the '.properties' file is present in a specific folder make sure you access the file as
folder_name.filename.properties


..............................<br />Exceptions are a part of possibility<br />Errors are a part of truth<br />................................
 
Consider Paul's rocket mass heater.
 
subject: Resource Bundle Error