AdoptOpenJDK/jitwatch

JITWatch complains of missing -XX:+TraceClassLoading even when it's specified

ssilverman opened this issue · 3 comments

I built my program and produced logs using both jdk 11 and 14.
My VM options are: -XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+LogCompilation -XX:+PrintAssembly

However, when I try to examine the logs, I see this error in a dialog box:

JITWatch requires the -XX:TraceClassLoading VM switch to be used.

Please recreate your log file with this switch enabled."

I also see this in the console: ERROR o.a.j.u.JITWatchUI - Missing VM Switch -XX:+TraceClassLoading

Update: I discovered that the example uses v1.0.0 but there's a v1.1.5, so I tried that, and it appears that there's no org.adoptopenjdk.jitwatch.launch.LaunchUI class that exists in that Maven download, even though that's what's specified in the manifest.

Well, I added this repository:

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

And used this dependency:

        <dependency>
            <groupId>com.github.AdoptOpenJDK</groupId>
            <artifactId>jitwatch</artifactId>
            <version>1.3.0</version>
        </dependency>

and now things are working. (I like Jitpack a lot.)

Hi, thanks for reporting.

The version(s) of JITWatch available in maven central are very old and missing a lot of features and bug fixes. I've tried and failed to get up the maven release learning curve a few times :(

For now I strongly recommend you clone and build JITWatch but I will try and find time to create a modern maven release.