As described in a previous post, Mission Control is now on GitHub. Since this alters how to fetch and build OpenJDK Mission Control, this is an updated version of my old post on how to fetch and build JMC from version 8 and up.
Getting Git
First step is to get Git, the SCM used for OpenJDK Mission Control. Installing Git is different for different platforms, but here is a link to how to get started:
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Installing the Skara Tooling (Optional)
This is an optional step, making it easier if you want to contribute to Mission Control:
Cloning the Source
Once Git is installed properly, getting the source is as easy as cloning the jmc repo. First change into the directory where you want to check out jmc. Then run:
git clone https://github.com/openjdk/jmc.git
Getting Maven
Since you probably have some Java experience, you probably already have Maven installed on your system. If you do not, you now need to install it. Simply follow the instructions here:
Building Mission Control
First we need to ensure that Java 8 is on our path. Some of the build components still use JDK 8, so this is important.
java –version
This will show the Java version in use. If this is not a Java 8 JDK, change your path. Once done, we are now ready to build Mission Control. Open up two terminals. Yep, two!
In the first one, go to where your cloned JMC resides and type in and execute the following commands (for Windows, replace the dash (/) with a backslash (\)):
cd releng/third-party
mvn p2:site
mvn jetty:run
Now, leave that terminal open with the jetty running. Do not touch.
In the second terminal, go to your cloned jmc directory. First we will need to build and install the core libraries:
cd core
mvn install
Next run maven in the jmc root:
mvn clean package
JMC should now be building. The first time you build Maven will download all of the third party dependencies. This will take some time. Subsequent builds will be less painful. On my system, the first build took 6:01 min. The subsequent clean package build took 2:38.
Running Mission Control
To start your recently built Mission Control, run:
Windows
target\products\org.openjdk.jmc\win32\win32\x86_64\jmc.exe -vm %JAVA_HOME%\bin
Mac OS X
target/products/org.openjdk.jmc/macosx/cocoa/x86_64/JDK\ Mission\ Control.app/Contents/MacOS/jmc -vm $JAVA_HOME/bin
Contributing to JDK Mission Control
To contribute to JDK Mission Control, you need to have signed an Oracle Contributor Agreement. More information can be found here:
Don’t forget to join the dev list:
We also have a Slack (for contributors), which you can join here:
More Info
For more information on how to run tests, use APIs etc, there is a README.md file in the root of the repo. Let me know in the comments section if there is something you think I should add to this blog post and/or the README!