Skip to content

"com.sun.tools.attach.AgentLoadException: Agent JAR not found or no Agent-Class attribute" using AdoptOpenJDK 16Β #20

@Pieter12345

Description

@Pieter12345

Using AdoptOpenJDK 16 on Windows 10, I'm getting the following exception after selecting the Java process that I wish to monitor:

Sampling set to stop in 5 seconds.
Starting a server on /0.0.0.0:23000...
Once the server starts (shortly), visit the URL in your browser.
Note: The longer you wait before using the output of that webpage, the more accurate the results will be.
com.sun.tools.attach.AgentLoadException: Agent JAR not found or no Agent-Class attribute
        at jdk.attach/sun.tools.attach.HotSpotVirtualMachine.loadAgent(HotSpotVirtualMachine.java:159)
        at jdk.attach/com.sun.tools.attach.VirtualMachine.loadAgent(VirtualMachine.java:538)
        at com.sk89q.warmroast.WarmRoast.connect(WarmRoast.java:122)
        at com.sk89q.warmroast.WarmRoast.main(WarmRoast.java:327)

Additional information:
AdoptOpenJDK 8 has a jre/lib/management-agent.jar whereas some Java versions later, this jre directory no longer exists and JAVA_HOME now points directly to the JDK directory that no longer contains such a management-agent.jar file. This is referenced here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions