File directory = new File("");// 参数为空 String courseFile = directory.getCanonicalPath(); System.out.println("********"); System.out.println(courseFile);