org.tbwork.anole.loader.util.OsUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of anole-loader Show documentation
Show all versions of anole-loader Show documentation
An awesome property or configuration loader for java.
The newest version!
package org.tbwork.anole.loader.util;
import org.tbwork.anole.loader.enums.OsCategory;
public class OsUtil {
public static OsCategory getOsCategory(){
String os = System.getProperty("os.name");
if(os.toLowerCase().startsWith("win")){
return OsCategory.WINDOWS;
}
else if(os.toLowerCase().startsWith("mac")){
return OsCategory.MAC;
}
else{ // linux
return OsCategory.LINUX;
}
}
}