java获取当前项目的src根路径

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010838785/article/details/90069019
String filePath = 当前类.class.getResource("/image1/*.jpg").getPath();
String path = System.getProperty("user.dir")+"\\src";

猜你喜欢

转载自blog.csdn.net/u010838785/article/details/90069019