コード例 #1
0
ファイル: VMConnection.java プロジェクト: 9r3y/c47
 private void dumpFailedLaunchInfo(Process process) {
   try {
     dumpStream(process.getErrorStream());
     dumpStream(process.getInputStream());
   } catch (IOException e) {
     MessageOutput.println("Unable to display process output:", e.getMessage());
   }
 }
コード例 #2
0
ファイル: VMConnection.java プロジェクト: 9r3y/c47
 /* launch child target vm */
 private VirtualMachine launchTarget() {
   LaunchingConnector launcher = (LaunchingConnector) connector;
   try {
     VirtualMachine vm = launcher.launch(connectorArgs);
     process = vm.process();
     displayRemoteOutput(process.getErrorStream());
     displayRemoteOutput(process.getInputStream());
     return vm;
   } catch (IOException ioe) {
     ioe.printStackTrace();
     MessageOutput.fatalError("Unable to launch target VM.");
   } catch (IllegalConnectorArgumentsException icae) {
     icae.printStackTrace();
     MessageOutput.fatalError("Internal debugger error.");
   } catch (VMStartException vmse) {
     MessageOutput.println("vmstartexception", vmse.getMessage());
     MessageOutput.println();
     dumpFailedLaunchInfo(vmse.process());
     MessageOutput.fatalError("Target VM failed to initialize.");
   }
   return null; // Shuts up the compiler
 }
コード例 #3
0
ファイル: Env.java プロジェクト: NathanEEvans/api
 static void shutdown(String message) {
   if (connection != null) {
     try {
       connection.disposeVM();
     } catch (VMDisconnectedException e) {
       // Shutting down after the VM has gone away. This is
       // not an error, and we just ignore it.
     }
   }
   if (message != null) {
     MessageOutput.lnprint(message);
     MessageOutput.println();
   }
   System.exit(0);
 }
コード例 #4
0
ファイル: VMConnection.java プロジェクト: 9r3y/c47
 /* listen for connection from target vm */
 private VirtualMachine listenTarget() {
   ListeningConnector listener = (ListeningConnector) connector;
   try {
     String retAddress = listener.startListening(connectorArgs);
     MessageOutput.println("Listening at address:", retAddress);
     vm = listener.accept(connectorArgs);
     listener.stopListening(connectorArgs);
     return vm;
   } catch (IOException ioe) {
     ioe.printStackTrace();
     MessageOutput.fatalError("Unable to attach to target VM.");
   } catch (IllegalConnectorArgumentsException icae) {
     icae.printStackTrace();
     MessageOutput.fatalError("Internal debugger error.");
   }
   return null; // Shuts up the compiler
 }
コード例 #5
0
 private static void usage() {
   MessageOutput.println("zz usage text", new Object[] {progname, File.pathSeparator});
   System.exit(1);
 }