Calling JMX MBean method from a shell script

The following command line JMX utilities are available: jmxterm – seems to be the most fully featured utility. cmdline-jmxclient – used in the WebArchive project seems very bare bones (and no development since 2006 it looks like) Groovy script and JMX – provides some really powerful JMX functionality but requires groovy and other library setup. … Read more

How to activate JMX on my JVM for access with jconsole?

The relevant documentation can be found here: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html Start your program with following parameters: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.rmi.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false For instance like this: java -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=9010 \ -Dcom.sun.management.jmxremote.local.only=false \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.ssl=false \ -jar Notepad.jar -Dcom.sun.management.jmxremote.local.only=false is not necessarily required but without it, it doesn’t work on Ubuntu. The error would be something … Read more