Wednesday, September 11, 2013

Java Mission Control - (yet) another JVM monitoring tool included in the JDK

Oracle launched Java 1.7 update 40 on Sep 10, 2013. This version includes the Java Mission Control JVM monitoring tool.

After having a look at the demo I thought it would be a good idea to test the tool myself.

So I installed the new Java version and executed bin\jmc.exe and ... no local JVMs were detected although several once were started on my machine.

I finally found the reason for that in the new Java Mission Control OTN Community forum. It was the first question in the FAQ:

Q: I cannot see any locally running JVMs in the JVM browser!
A1: Are you running in Eclipse? If so, make sure you run your Eclipse on a JDK, NOT a JRE!
A2: You should have a directory named hsperfdata_<user> in your tmp directory, where <user> is your login. Make sure that the directory can be written to. Also make sure that you are using a file system that supports ACLs.

A2 solved the problem for me and I could monitor my running JVMs. I did not take a very close look at the tool but several features seemed very similar to the features offered by the Java VisualVM tool that is included in the JDK since many releases. So I wondered why there are now 3  monitoring tools shipped with the JDK (Java Mission Control, Java VisualVM and JConsole) and if Java Mission Control is supposed to replace the other ones.

I asked that question on the Java Mission Control forum and it was immediatly answered by +Marcus Hirt (Java Mission Control Team Lead) who clarified the situation:

Hi there!

This is still being discussed, but I think the general concensus is that there is no longer a need to ship JConsole. As for Java Mission Control and JVisual VM they are somewhat complementary and focus on a little bit different use cases, not to mention that one integrates with the Eclipse platform and the other with Netbeans. Also, JVisual VM is open source, so if I could speculate, JVisual VM will almost certainly be used for OpenJDK no matter what. We'd certainly like to get as much input as possible on how you all would like the future to unfold!

Kind regards,

I am curious about the future of all these tools. For now it seems to be good to have a choice although it might be hard to be familiar with all tools and their features.

What do you think? Post a comment on the forum thread - I am sure the Java Misson Control Team will appreciate it!

Update Sep 12, 2013:

An important but somehow hidden information about Java Mission Control is that it is commercial. It is only bundled with the JDK for development and evaluation purposes. This is e.g. mentioned in this Oracle Press Release:

[...] freely available for download for development and evaluation purposes as part of JDK 7u40, but require the Oracle Java SE Advanced license for production use [...]