读取当前目录

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

  

原文地址:https://www.cnblogs.com/cdsj/p/5884480.html