How do you specify the address of a JMX connector server?

John Zukowski

The JMXServiceURL allows you to specify the URL like service:jmx:protocol:sap where protocol might be something like rmi and sap is the address at which the connector server is located. Once such URL string might be service:jmx:rmi:///jndi/rmi://localhost:4321/myserver.