try {
PropertyResourceBundle configBundle = (PropertyResourceBundle)PropertyResourceBundle.getBundle("config"); //这样调用config.properties文件
server_ip = configBundle.getString("Server"); //得到其中的一个设置
name = configBundle.getString("name");//得到其中的一个设置
}
catch(Exception ex) {
System.out.println(" unable to find string ");
}
PropertyResourceBundle configBundle = (PropertyResourceBundle)PropertyResourceBundle.getBundle("config"); //这样调用config.properties文件
server_ip = configBundle.getString("Server"); //得到其中的一个设置
name = configBundle.getString("name");//得到其中的一个设置
}
catch(Exception ex) {
System.out.println(" unable to find string ");
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货