时间:2020-10-08 13:28:50 | 栏目:JAVA代码 | 点击:次
如下所示:
public static void main(String[] args) { ProtectionDomain pd = StringUtils.class.getProtectionDomain(); CodeSource cs = pd.getCodeSource(); System.out.println(cs.getLocation()); }
打印出:file:/D:/work_ser_demo/springtest/WebContent/WEB-INF/lib/commons-lang-2.4.jar