java得到当前路径

xiaoxiao2022-06-13  53

JAVA怎样得到当前程序的路径呢?有两种方法 1 System.out.println(System.getProperty("user.dir")); 2 File f = new File(""); String path = f.getAbsolutePath();

 

相关资源:Java 面经手册·小傅哥(公众号:bugstack虫洞栈).pdf
转载请注明原文地址: https://www.6miu.com/read-4936194.html

最新回复(0)