-
Bug
-
Resolution: Fixed
-
P2
-
5.0, 9
-
b136
-
Verified
When running with `-javaagent:myagent.jar -Djava.system.classloader=MyClassLoader` then the myagent.jar is added to the application class loader rather than the custom system class loader.
This issue tracks changing the implementation so that appendClassPath is not used in Agent_OnLoad, instead it is call just before the agent class is loaded, probably invokeJavaAgentMainMethod.
In addition, package description will likely need a small update to make it clear that a custom system class loader will need to define appendToClassPathForInstrumentation in order to load the agent. Currently custom system class loaders are not required to implement this method.
This issue tracks changing the implementation so that appendClassPath is not used in Agent_OnLoad, instead it is call just before the agent class is loaded, probably invokeJavaAgentMainMethod.
In addition, package description will likely need a small update to make it clear that a custom system class loader will need to define appendToClassPathForInstrumentation in order to load the agent. Currently custom system class loaders are not required to implement this method.
- relates to
-
JDK-8208064 java.class.path does not reflect javaagent jars in Java9+
-
- Open
-