String rootPath = System.getProperty("user.dir");File root = new File(""); String rootPath = root .getCanonicalPath();