Reputation: 1231
can JConsole be embedded in a Java application please? My issue is just similar to mensioned in JavaCoreAPIs list but it is posted in 2007.
Has anyone been able to embed the JConsole in a java application and launch the JConsole with a "Launch JConsole" button to view JVM properties of that application?
Thanks in advance
Upvotes: 0
Views: 729
Reputation: 6229
Any reason you can't call something like sun.tools.jconsole.JConsole.main(new String[] {})
? The String array would be any arguments passed to jconsole.exe, inlcuding service:jmx: URLs. This class is in the jconsole.jar file in the jdk/lib directory.
If you start looking at the other classes in this jar you should also be able to create your own UI from different parts of the JConsole UI. Obviously, this is not official supported, but I doubt the high level main()
would change much between JVM interfaces.
Upvotes: 1