title: How to connect JBoss 7.1.1 remoting -jmx via java code?
body: <p>I have a JBoss 7.1.1 server, for which I want to write jmx client. As far I understood, jboss 7.1.1 is not using typical rmi based jmx and they have given a layer of remoting-jmx over native management. I am using following code: </p>
  
  <pre><code>JMXServiceURL address = new JMXServiceURL("service:jmx:remoting-jmx://localhost:9999");
  
  Map env = JMXConnectorConfig.getEnvironment(paramtbl);
  
  JMXConnector connector = JMXConnectorFactory.connect(address, env);
  </code></pre>
  
  <p>But it is giving following exception: </p>
  
  <pre><code>java.net.MalformedURLException: Unsupported protocol: remoting-jmx
  </code></pre>
  
  <p>I googled it and the following thread seems relevant:
  <a href="https://community.jboss.org/thread/204653?tstart=0" rel="nofollow">https://community.jboss.org/thread/204653?tstart=0</a></p>
  
  <p>It asks to add jboss's libraries to my classpath. I tried that also but still getting same exception. </p>