最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
查看import的类是出自哪个jar包的方法
时间:2022-06-25 14:20:55 编辑:袖梨 来源:一聚教程网
代码如下 | 复制代码 |
publicstaticvoidmain(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