Here you can find the source of isWindows()
public static boolean isWindows()
//package com.java2s; import java.io.File; public class Main { public static boolean isWindows() { String name = System.getProperty("os.name"); return name != null ? name.contains("Windows") : File.separatorChar == '\\'; }//from www . ja va2 s .com }