JVM类加载路径查看

类加载路径查看

# 测试阶段,直接查看某个类加载路径
System.out.println(org.apache.http.client.HttpClient.class.getProtectionDomain().getCodeSource().getLocation());

# 加入启动参数中,将输出类加载信息
java -verbose:class 

References

  1. https://segmentfault.com/a/1190000037574626
  2. https://stackoverflow.com/questions/10230279/java-verbose-class-loading
  3. https://blog.csdn.net/meinanqihao/article/details/97615591
  4. https://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html
posted @ 2021-08-31 10:02  一弓一土两亩田  阅读(61)  评论(0编辑  收藏  举报