public File getClassRootDir(Class classz){ String filePath = classz.getProtectionDomain().getCodeSource().getLocation().getFile(); return new File(filePath); } public File getJarFile(Class classz){ String filePath = classz.getProtectionDomain().getCodeSource().getLocation().getFile(); return new File(filePath); }
获取类根路径及jar包路径
最新推荐文章于 2021-09-25 17:44:00 发布