Here you can find the source of isRelativePath(String path)
public static boolean isRelativePath(String path)
//package com.java2s; //License from project: Open Source License import java.io.File; public class Main { public static boolean isRelativePath(String path) { if (path == null) { return false; } else {/*from w w w . j a v a2 s. c o m*/ return !new File(path).isAbsolute(); } } }