You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicvoidrun() {
// Ready to go with the database...try {
if (classFilter == null) {
// If not already set, the name of the filter comes from a System property.// If we have a pkgList, pass it, otherwise let the filter read// its own System property for the list of classes.StringfilterClassName = System.getProperty("sun.jvm.hotspot.tools.jcore.filter",
"sun.jvm.hotspot.tools.jcore.PackageNameFilter");
try {
ClassfilterClass = Class.forName(filterClassName);
if (pkgList == null) {
classFilter = (ClassFilter) filterClass.newInstance();
} else {
Constructorcon = filterClass.getConstructor(String.class);
classFilter = (ClassFilter) con.newInstance(pkgList);
}
} catch(Exceptionexp) {
System.err.println("Warning: Can not create class filter!");
}
}
因为即使加了各种的
--add-exports
,在jdk.hotspot.agent
里,是在 sun.jvm.hotspot.tools.jcore.ClassDump.run() 里 ,用Class.forName 来加载filter类的。用户自定义的类加载不到。http://hengyunabc.github.io/dumpclass/
The text was updated successfully, but these errors were encountered: