import java.util.ResourceBundle;
public class ResourceBundleDemo {
public static void main(String[] args) {
// create a new ResourceBundle with default locale
ResourceBundle bundle =
ResourceBundle.getBundle("fullo");
// print the text assigned to key "hello"
System.out.println("" + bundle.getString("hello"));
System.out.println("" + bundle.getString("gallo"));
}
}
资源文件fullo_zh_CN.properties
hello=Hello World!
gallo=\u95EE\u5019\u65B9\u6821\u957F
eclipse工程源代码:http://pan.baidu.com/share/link?shareid=1687025360&uk=3878681452