//得到java工程的相对路径:/E:/workspace/testHj/bin/
String path=AdditivesBasic.class.getResource("/").getPath();
// 也可以下面这样写
String path=AdditivesBasic.class.getClassLoader().getResource("").getPath();
java的各种路径的获取
最新推荐文章于 2021-09-09 23:12:45 发布