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

前端 未结 3 606
粉色の甜心
粉色の甜心 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 05:58

    An alternative to the build instructions provided by Steven is to use docker-compose to do the build:

    $ hg clone http://hg.openjdk.java.net/jmc/jmc/
    $ cd jmc/jmc/docker
    $ docker-compose up
    # Wait for the build to finish, then exit it with Ctrl-C
    $ cd ../target
    $ ls products/org.openjdk.jmc/
    linux macosx win32
    # Run the binary from the correct OS
    $ ./products/org.openjdk.jmc/linux/gtk/x86_64/jmc
    
    0 讨论(0)
  • 2021-01-04 06:05

    Java Mission Control is an Oracle addon. If you want to profile I suggest you use the OpenJDK and/or a commercial profile like YourKit.

    If they are not part of the OpenJDK, can I download them using apt-get install

    You have to download it from the Oracle website after agreeing to their usage license.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题