获取ClassPath路径

xiaoxiao2021-02-28  118

String classPath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); String classPath2 = PDFUtils.class.getProtectionDomain().getCodeSource().getLocation().getPath(); String classPath3 = PDFUtils.class.getProtectionDomain().getCodeSource().getLocation().getFile(); String classPath4 = PDFUtils.class.getClass().getResource("/").getPath();
转载请注明原文地址: https://www.6miu.com/read-25792.html

最新回复(0)