HendSame commented on a change in pull request #6273: URL: https://github.com/apache/skywalking/pull/6273#discussion_r566123883
########## File path: docs/en/FAQ/Load-outside-jar-to-classpath.md ########## @@ -0,0 +1,24 @@ +# Load outside jar to classpath + +### Problem +In some cases, especially when the target java app is packaged in an old way,that mean the depency libs directory is out of the target application jar. We need to add some VM options to make sure the java applications starts well, like "java -cp **/lib -ext.dirs **/lib" . +But when we add these VM options, the target ClassLoaders may not be able to load any classes from skywalking-agent.jar cause it's out of the path i have defined previously. The target app classloader or any of its parent classloader will load the class with failure and push it down to AgentClassLoader to load the class ,and finally ,the not class found exception will stop the application from start. + +### Resolve +"-Xbootclasspath/a:" can solve this problem. +By the way ,we can use the BootstrapClassLoader to load the them. Review comment: Got it. What if we can get application's codes and agent's codes to load by application class loader. For example: Instrumentation.**_appendToSystemClassLoaderSearch_**(application's jar or application's dependency jar) ? Is this working? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org