Java VM hang after VMStartEvent

79 views Asked by At
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

0

There are 0 answers