Here you can find the source of isAbsolutePath(String path)
public static boolean isAbsolutePath(String path)
//package com.java2s; //License from project: GNU General Public License public class Main { public static boolean isAbsolutePath(String path) { boolean isWindows = getPlatform().startsWith("win"); if (isWindows) return path.length() > 1 && path.charAt(1) == ':'; return path.startsWith("/"); }//ww w . j a v a2 s . c o m public static String getPlatform() { boolean is64bit = System.getProperty("os.arch", "").indexOf("64") >= 0; String osName = System.getProperty("os.name", "<unknown>"); if (osName.equals("Linux")) return "linux" + (is64bit ? "64" : "32"); if (osName.equals("Mac OS X")) return "macosx"; if (osName.startsWith("Windows")) return "win" + (is64bit ? "64" : "32"); //System.err.println("Unknown platform: " + osName); return osName.toLowerCase(); } }