com.luues.util.SystemUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-util Show documentation
Show all versions of commons-util Show documentation
A Simple Tool Operations Class
package com.luues.util;
public class SystemUtil {
public static String getOsName(){
return System.getProperty("os.name");
}
public static boolean isLinux(){
if(getOsName().toLowerCase().startsWith("linux")){
return true;
}
return false;
}
public static boolean isMac(){
if(getOsName().toLowerCase().startsWith("mac")){
return true;
}
return false;
}
public static boolean isWindows(){
if(getOsName().toLowerCase().startsWith("window")){
return true;
}
return false;
}
}