I am trying to set the port number at which the JMX server starts dynamically through the program. Usually it is done using -Dcom.sun.management.jmxremote.port=1234 (static port), which works fine. Any thoughts on how can it be done dynamically?
Asked
Active
Viewed 907 times
1 Answers
1
System.setProperty("com.sun.management.jmxremote.port", "1234");

user207421
- 305,947
- 44
- 307
- 483
-
This does not work - see http://stackoverflow.com/questions/7276881/how-to-set-jmx-remote-port-system-environment-parameters-through-java-code-for-r – Mark Butler Jul 23 '13 at 01:11