Where to find Java Mission Control and VisualVM on Ubuntu (OpenJDK 8)?

前端 未结 3 623
粉色の甜心
粉色の甜心 2021-01-04 05:21

I installed OpenJDK 8 on Ubuntu using sudo apt-get install openjdk-8-jdk, and it was installed to /usr/lib/jvm/java-8-openjdk-amd64.

Where

3条回答
  •  时光取名叫无心
    2021-01-04 06:16

    Some OpenJDK distribution maintainers are now providing jmc builds like AdoptOpenJDK, Amazon Corretto or Azul Zulu.

    Java Mission Control (jmc) is open source and hosted on GitHub and openjdk.java.net (as a Mercurial repository).

    Official nightly builds are available here.

    It is also rather easy to build jmc yourself using the instructions from the readme file:

    hg clone http://hg.openjdk.java.net/jmc/jmc/
    cd jmc/releng/third-party
    mvn p2:site
    mvn jetty:run
    

    In a different terminal:

    cd core
    mvn clean install
    cd ..
    mvn package
    

    After installing, you can close the Jetty server running in the first terminal.

    Alternatively, you can use Docker to build jmc:

    docker-compose -f docker/docker-compose.yml run jmc
    

    To launch jmc:

    • on Linux: target/products/org.openjdk.jmc/linux/gtk/x86_64/jmc
    • on macOS: target/products/org.openjdk.jmc/macosx/cocoa/x86_64/JDK\ Mission\ Control.app/Contents/MacOS/jmc
    • on Windows: target\products\org.openjdk.jmc\win32\win32\x86_64\jmc.exe

    You should see a splash screen now:


    More info in this blog post.

提交回复
热议问题