I am using the Java Visual VM command line to open remote JMX connections. I use it like this:
jvisualvm.exe --userdir "user-config" --openjmx hostname:port
This works perfectly fine. But the connection name in the view shows as hostname:port
. Is there any way I can pass a logical name to this connection? I can rename the connection from the view, but it doesn't stick when I reopen. I have about 10 connections from the same hostname, so wanted to logically separate out the individual connections.
Any ideas? It would even work if can just have the names stick in the user-config.
You can start your application with -Dvisualvm.display.name="Your_name"
and your application will be named "Your_name" in VisualVM. See this and this feature requests for details. Note that you have to use VisualVM 1.3.4+ or Java VisualVM from JDK 7 Update 6 or newer.