判断程序运行系统环境,可以用于本地与服务器自动切换
Properties prop = System.getProperties();
String os = prop.getProperty("os.name");
System.out.println(os.toLowerCase());
if (os != null && os.toLowerCase().indexOf("linux") > -1) {
} else {
}
判断程序运行系统环境
猜你喜欢
转载自www.cnblogs.com/why5125/p/11715045.html
今日推荐
周排行