My javaagent, run through -javagent tool classes with static method callbacks on one of my classes. This works great, besides system classes, for example. java / lang, java / util, which throw a ClassDefNotFounderror at the time the method is called (using INVOKESTATIC). So it looks like they are instrumented because the method call is being executed but has an access or visibility issue that my user classes do not have. My callback class and its methods are publicly available.
I tried adding my class to the classpath (and not just loading via -javaagent), but that didn't help. Is there any kind of protection for system classes that I need to override?
source
share