Java examples for java.util:Properties File
is Windows from system properties
import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration; import javax.servlet.http.HttpServletRequest; public class Main{ public static void main(String[] argv) throws Exception{ System.out.println(isWindowsOS()); }//w w w.j a v a2 s . c om public static boolean isWindowsOS() { boolean isWindowsOS = false; String osName = System.getProperty("os.name"); if (osName.toLowerCase().indexOf("windows") > -1) { isWindowsOS = true; } return isWindowsOS; } }