A great example of explaining a scenario in which one jvm is connected to another is the use of the Java Profiler. Profilers are mainly used to get an idea of another jvm for performance profiling. The application under examination is attached to the jvm profiler, which analyzes the heap / stack to determine various information about the jvm under study.
The standard jvisualvm profiler uses the JVM TI API , for example, to execute and control garbage collection. Java Management Extensions (JMX) is used as the general level of communication.
source share