test/hotspot/jtreg/compiler/graalunit/common/GraalUnitTestLauncher.java
changeset 54583 9fe44a3335b2
parent 54527 96d290a7e94f
child 54730 8bca46822c05
--- a/test/hotspot/jtreg/compiler/graalunit/common/GraalUnitTestLauncher.java	Fri Apr 19 14:42:23 2019 +0800
+++ b/test/hotspot/jtreg/compiler/graalunit/common/GraalUnitTestLauncher.java	Fri Apr 19 11:18:06 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -270,8 +270,7 @@
         // Some tests rely on MX_SUBPROCESS_COMMAND_FILE env variable which contains
         // name of the file with java executable and java args used to launch the current process.
         Path cmdFile = Files.createTempFile(Path.of(""), "mx_subprocess_", ".cmd");
-        Files.writeString(cmdFile, JDKToolFinder.getJDKTool("java") + System.lineSeparator());
-        Files.write(cmdFile, javaFlags, StandardOpenOption.APPEND);
+        Files.write(cmdFile, javaPB.command());
         javaPB.environment().put("MX_SUBPROCESS_COMMAND_FILE", cmdFile.toAbsolutePath().toString());
 
         System.out.println("INFO: run command: " + String.join(" ", javaPB.command()));