Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160950 Agent JAR added to app class loader rather than system class loader when running with -Djava.system.class.loader
  3. JDK-8174885

Release Note: Agent JAR added to app class loader rather than system class loader when running with -Djava.system.class.loader

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P2
    • Resolution: Delivered
    • Affects Version/s: 9
    • Fix Version/s: None
    • Component/s: core-svc

      Description

        When running a java application with the options
          "-javaagent:myagent.jar -Djava.system.classloader=MyClassLoader",
        myagent.jar is added to the custom system class loader rather
        than the application class loader.
       
        In addition, the java.lang.instrument package description has a small
        update making it clear that a custom system class loader needs to define
        appendToClassPathForInstrumentation in order to load the agent at startup.
        Before custom system class loaders were required to implement this method
        only if the agents are started in the live phase (Agent_OnAttach).

        Attachments

          Activity

            People

            • Assignee:
              sspitsyn Serguei Spitsyn
              Reporter:
              sspitsyn Serguei Spitsyn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: