vm = launchTarget("com.sun.tools.example.trace.Hello", false);
EventQueue eventQ = vm.eventQueue();
boolean connected = true;
while (connected) {
try {
EventSet eventSet = queue.remove();
EventIterator it = eventSet.eventIterator();
while (it.hasNext()) {
handleEvent(it.nextEvent());
}
eventSet.resume();
} catch (InterruptedException exc) {
// Ignore
} catch (VMDisconnectedException discExc) {
//handleDisconnectedException();
break;
}
}
After VMStartEvent virtual machine hang in this line
EventSet eventSet = queue.remove();
VM is launched with suspend = false
. I use java 1.7