Source Code : Load resource with ResourceBundle.getBundle
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Load resource with ResourceBundle.getBundle
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class HelloWorldResources {
public static void main(String[] argv) {
ResourceBundle resources;
try {
resources = ResourceBundle.getBundle("MyData");
System.out.println(resources.getString("Hi"));
} catch (MissingResourceException mre) {
System.err.println("MyData.properties not found");
}
}
}
//MyData.properties
Hi = Hello World!
//MyData_fr.properties
Hi = Salut tout le monde!
Thank with us