Markus Weninger
Markus Weninger

Reputation: 12658

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

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 can I find the Java Mission Control (I think called jmc) and VisualVM (I think called jvisualvm) programs?

I assumed both to be installed with the JDK:

What am I missing? Are both only part of the Oracle JDK, or did I use the wrong install command?

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

Upvotes: 18

Views: 13423

Answers (3)

Steven
Steven

Reputation: 2275

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:

splash_screen_of_java_mission_control


More info in this blog post.

Upvotes: 26

Ophirr33
Ophirr33

Reputation: 185

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

Upvotes: 1

Peter Lawrey
Peter Lawrey

Reputation: 533530

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.

Upvotes: 4

Related Questions