title: How to connect to a java program on localhost jvm using JMX?
body: <p>I should connect to a java program on localhost jvm using JMX. In other words I want to develop a JMX client to config a java program on localhost.</p>
  
  <ul>
  <li><p>Don't recommend using JConsole! JConsole is not suitable because it is general JMX client and have negative effect on main program performance.</p></li>
  <li><p>Samples on oracle site use RMIConnector and host:port params but I don't know: 
  where should set jmx port?</p></li>
  <li><p>JConsole have an option to connect to java processes by PID. But I don't find any method in JMX api that have PID as input param.</p></li>
  </ul>