public class proUtil {
public static Map<String, String> map = new HashMap<String, String>();
static{
String parasource = System.getProperty("os.name").toLowerCase().startsWith("win")?"parameter.properties":"parameter_linux.properties";
//InputStream in = ToolService.class.getClassLoader().getResourceAsStream(parasource);
try {
InputStreamReader in = new InputStreamReader(ToolService.class.getClassLoader().getResourceAsStream(pparasource), "UTF-8") ;
Properties p = new Properties();
p.load(in);
map.put("key", p.getProperty("key"));
.........
}catch (Exception e) {
e.printStackTrace();
}
}
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。