Java VM在VMStartEvent之后挂起

时间:2015-06-11 07:14:57

标签: java java-7 jdi

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;
     }
}

VMStartEvent虚拟机在此行中挂起

EventSet eventSet = queue.remove();

VM使用suspend = false启动。我用java 1.7

0 个答案:

没有答案