< prev index next >

test/hotspot/jtreg/serviceability/dcmd/framework/TestProcessLauncher.java

Print this page

        

@@ -24,24 +24,18 @@
 
 import nsk.share.*;
 import nsk.share.jpda.*;
 import nsk.share.jdi.*;
 
-import java.nio.file.FileSystems;
-import java.nio.file.Path;
-
 /**
  * Launches a new Java process that uses a communication pipe to interact
  * with the test.
  */
 
 public class TestProcessLauncher {
 
-    protected static final Path USER_DIR = FileSystems.getDefault().getPath(System.getProperty("user.dir", "."));
-    protected static final Path TEST_CLASSES_DIR = FileSystems.getDefault().getPath(System.getProperty("test.classes"));
-
-    protected final String className;
+    private final String className;
     private final ArgumentHandler argHandler;
 
     private IOPipe pipe;
 
     public TestProcessLauncher(String className, ArgumentHandler argHandler) {

@@ -59,11 +53,11 @@
 
         Log log = new Log(System.out, argHandler);
         Binder binder = new Binder(argHandler, log);
         binder.prepareForPipeConnection(argHandler);
 
-        String cmd = prepareLaunch(java, argHandler.getPipePort());
+        String cmd = java + " " + className + " -pipe.port=" + argHandler.getPipePort();
 
         Debugee debuggee = binder.startLocalDebugee(cmd);
         debuggee.redirectOutput(log);
 
         pipe = new IOPipe(debuggee);

@@ -79,10 +73,6 @@
         if (pipe != null) {
             pipe.println("quit");
         }
     }
 
-    protected String prepareLaunch(String javaExec, String pipePort) {
-        return  javaExec + " " + className + " -pipe.port=" + pipePort;
-    }
-
 }
< prev index next >