Reputation: 85
What is basename in ResourceBundle I have example and files like this
import java.util.Locale;
import java.util.ResourceBundle;
public class Main
{
public static void main(String[] argv) throws Exception
{
ResourceBundle rb = ResourceBundle.getBundle("RresourcesDynamic");
System.out.println(rb.getString("title"));
}
}
///here when i run this program i am getting exception like this
//Exception in thread "main" java.util.MissingResourceException: Can't bundle for base name RresourcesDynamic, locale en_US
//what is basename what i have to mention in this argument is this file name or what?
ResourcesDynamic.properties----title=leo
Thanks in advance
Upvotes: 0
Views: 1286
Reputation: 390
RresourcesDynamic (in source) != ResourcesDynamic (filename)
Short: ResourceBundle.properties (usual key=value properties file) must exists in class path
Upvotes: 1