You can connect to another JVM process from a Java application (for example, to be able to monitor what going on and potentially detect problems before they happen ). You can do this using the Attach API . I donβt know much about connecting to processes other than the JVM.
String name = ... List vms = VirtualMachine.list(); for (VirtualMachineDescriptor vmd: vms) { if (vmd.displayName().equals(name)) { VirtualMachine vm = VirtualMachine.attach(vmd.id()); String agent = ... vm.loadAgent(agent);
nowaq source share