Skip to content

Instantly share code, notes, and snippets.

@fs111
Created February 8, 2017 13:29
Show Gist options
  • Save fs111/1f19ba24a3ac3fa0eee36c4cfb97a653 to your computer and use it in GitHub Desktop.
Save fs111/1f19ba24a3ac3fa0eee36c4cfb97a653 to your computer and use it in GitHub Desktop.
@Test
public void testJMXURL() throws IOException {
String url = "service:jmx:rmi:///jndi/rmi://host.example.com:34517/jmxrmi";
JMXServiceURL serviceURL = new JMXServiceURL(url);
assertEquals("host.example.com", serviceURL.getHost());
assertEquals(34517, serviceURL.getPort());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment