The jcmd
utility offers multiple diagnostic commands:
https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr006.html
Is it possible to have custom commands and handle them in the running JVM?
Something like: jcmd $PID myCmd
jcmd
handles only a list of predefined JVM commands. However, there are multiple ways to implement custom management commands without jcmd
.