/**
* 判断系统版本
*/
public static int osInfo()
{
String name = System.getProperty(" os.name");//得到操作系统名字
String s = System.getProperty("sun.os.patch.level");//得到操作系统版本
if(name.toLowerCase().startsWith("win")){
System.out.println("windows");
}
System.out.println(name);
System.out.println(s);
return 0;
}
* 判断系统版本
*/
public static int osInfo()
{
String name = System.getProperty(" os.name");//得到操作系统名字
String s = System.getProperty("sun.os.patch.level");//得到操作系统版本
if(name.toLowerCase().startsWith("win")){
System.out.println("windows");
}
System.out.println(name);
System.out.println(s);
return 0;
}