I am trying to run the below sample code in java.
import java.util.Locale;
import java.util.ResourceBundle;
public class InternationalizationDemo {
public static void main(String[] args) {
ResourceBundle bundle = ResourceBundle.getBundle("MessageBundle", Locale.CANADA_FRENCH);
System.out.println("Message in "+Locale.CANADA_FRENCH +":"+bundle.getString("greeting"));
}
}
1.The above code executes properly when MessageBundle.properties
is placed in the class path.
But I want to execute the above code successfully by removing the MessageBundle.properties
from the classpath and placing it in some other location.
How can I do this?
Thanks in Advance.