System.out.println(System.getProperty("user.dir"));
File directory = new File("");//设定为当前文件夹 System.out.println(directory.getCanonicalPath());//获取标准的路径 System.out.println(directory.getAbsolutePath());//获取绝对路径