- 获取正在运行的类所在jar包的路径
String filePath = clazz.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
filePath = new File(filePath).getAbsolutePath();
String filePath = clazz.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath();
filePath = new File(filePath).getAbsolutePath();
1823
1573

被折叠的 条评论
为什么被折叠?