1 package org.jacorb.test.common.launch; 2 3 23 24 import java.util.*; 25 import java.io.*; 26 27 33 public class JacoLauncher extends JacORBLauncher 34 { 35 public JacoLauncher(String jacorbHome, boolean coverage) 36 { 37 super(jacorbHome, coverage); 38 if (coverage) 39 System.out.println ("WARNING: Cannot find coverage when running under jaco"); 40 } 41 42 public Process launch(String classpath, 43 Properties props, 44 String mainClass, 45 String [] args) 46 { 47 Runtime rt = Runtime.getRuntime(); 48 49 List cmdList = new ArrayList(); 50 51 cmdList.add (jacorbHome + "/bin/jaco"); 52 cmdList.addAll (propsToArgList (props)); 53 cmdList.add (mainClass); 54 cmdList.addAll (Arrays.asList(args)); 55 56 String [] envp = new String [] 57 { 58 "JACORB_HOME=" + jacorbHome, 59 "CLASSPATH=" + classpath, 60 }; 61 62 try 63 { 64 return rt.exec(toStringArray(cmdList), envp); 65 } 66 catch (IOException ex) 67 { 68 throw new RuntimeException (ex); 69 } 70 } 71 } 72 | Popular Tags |