Run A Java Process to Listen to JVisualVM Requests from Other Hosts

Updated 28 Jan 2015

Let's say you have a Java program, testjmx.TestIt, on your machine that has IP address Run it like so:

mwood@workstation:~/workspace/testjmx/bin$ java \ \ \ \
    -Djava.rmi.server.hostname= \

The first three defines are well-documented; the last define, where you spell out to RMI what host it's runing on, is not very well documented, but there's a note about it here:

The hostname that you define in the java.rmi.server.hostname system property must match exactly the hostname you use when connecting from JVisualVM.

Then, on another machine, just do this:

mwood@laptop:~$ jvisualvm

Add a new JMX connection to localhost:1234, then find that new connection in the left-hand pane, and double-click on it to start monitoring.