To build simple run
./gradlew jar
and to runjava -jar build/libs/jmx-test.jar
, or use./gradlew run
which will both compile and run the project.
Upon the program start running, run
jconsole
, "JAVA_HOME must be on the system path", and search for the process.
References:
https://www.baeldung.com/java-management-extensions
https://docs.oracle.com/javase/tutorial/jmx/
https://alvinalexander.com/blog/post/java/source-code-java-jmx-hello-world-application
https://docs.oracle.com/javase/tutorial/jmx/overview/index.html