when i am trying to load the properties file in to my class, my program is not able to identify the properties file, i even tryed by passing the entire path but there is no luck. Please find the code that i am facing problem
Code:
public static String mymethod(String ss)
{
ResourceBundle resources = ResourceBundle.getBundle(ss);
String s = resources.getString("USER");
System.out.println(s);
return s;
}
public static void main(String[] args) {
String st =mymethod("DBase");
System.out.println(st);
}
The Exception i am getting is :
java.util.MissingResourceException: Can't find bundle for base name DBase, 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 dev_java.examples.HelloWorld.mymethod(HelloWorld.java:13)
at dev_java.examples.HelloWorld.main(HelloWorld.java:25)
---------------- Exception Ends ------------
Any help can be appreciated
Code:
public static String mymethod(String ss)
{
ResourceBundle resources = ResourceBundle.getBundle(ss);
String s = resources.getString("USER");
System.out.println(s);
return s;
}
public static void main(String[] args) {
String st =mymethod("DBase");
System.out.println(st);
}
The Exception i am getting is :
java.util.MissingResourceException: Can't find bundle for base name DBase, 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 dev_java.examples.HelloWorld.mymethod(HelloWorld.java:13)
at dev_java.examples.HelloWorld.main(HelloWorld.java:25)
---------------- Exception Ends ------------
Any help can be appreciated