查看class实际执行的类路径

查看class真实归属的jar包位置
getClass().getClassLoader().getResource(getClass().getName().replace('.', '/') + ".class")
原文地址:https://www.cnblogs.com/tangou/p/6922810.html