diff --git a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java index b5b15f6d75f..87e59d1c486 100644 --- a/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java +++ b/test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java @@ -53,6 +53,7 @@ public class TestJcmdOutput { System.out.println("Verify jcmd error message and that jcmd does not write errors to the target process output"); output = new OutputAnalyzer((ProcessTools.createLimitedTestJavaProcessBuilder( "-Dtest.jdk=" + System.getProperty("test.jdk"), + "-Dcompile.jdk=" + System.getProperty("compile.jdk"), "-XX:MinHeapFreeRatio=20", "-XX:MaxHeapFreeRatio=80", runJcmd.class.getName())).start()); output.shouldHaveExitValue(0); diff --git a/test/hotspot/jtreg/runtime/NMT/JcmdWithNMTDisabled.java b/test/hotspot/jtreg/runtime/NMT/JcmdWithNMTDisabled.java index 3b61a0be383..4e044311bcb 100644 --- a/test/hotspot/jtreg/runtime/NMT/JcmdWithNMTDisabled.java +++ b/test/hotspot/jtreg/runtime/NMT/JcmdWithNMTDisabled.java @@ -48,16 +48,20 @@ public class JcmdWithNMTDisabled { ProcessBuilder pb; OutputAnalyzer output; String testjdkPath = System.getProperty("test.jdk"); + String compilejdkPath = System.getProperty("compile.jdk"); // First run without enabling NMT (not in debug, where NMT is by default on) if (!Platform.isDebugBuild()) { - pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Dtest.jdk=" + testjdkPath, "JcmdWithNMTDisabled"); + pb = ProcessTools.createLimitedTestJavaProcessBuilder( + "-Dtest.jdk=" + testjdkPath, "-Dcompile.jdk=" + compilejdkPath, "JcmdWithNMTDisabled"); output = new OutputAnalyzer(pb.start()); output.shouldHaveExitValue(0); } // Then run with explicitly disabling NMT, should not be any difference - pb = ProcessTools.createLimitedTestJavaProcessBuilder("-Dtest.jdk=" + testjdkPath, "-XX:NativeMemoryTracking=off", "JcmdWithNMTDisabled"); + pb = ProcessTools.createLimitedTestJavaProcessBuilder( + "-Dtest.jdk=" + testjdkPath, "-Dcompile.jdk=" + compilejdkPath, + "-XX:NativeMemoryTracking=off", "JcmdWithNMTDisabled"); output = new OutputAnalyzer(pb.start()); output.shouldHaveExitValue(0); diff --git a/test/hotspot/jtreg/runtime/cds/DumpSharedDictionary.java b/test/hotspot/jtreg/runtime/cds/DumpSharedDictionary.java index fa1fb884339..afefdaa7448 100644 --- a/test/hotspot/jtreg/runtime/cds/DumpSharedDictionary.java +++ b/test/hotspot/jtreg/runtime/cds/DumpSharedDictionary.java @@ -44,12 +44,11 @@ public class DumpSharedDictionary { .setArchiveName("./DumpSharedDictionary.jsa"); CDSTestUtils.createArchiveAndCheck(opts); - String testjdkPath = System.getProperty("test.jdk"); - opts = (new CDSOptions()) .setUseVersion(false) .addSuffix("-XX:SharedArchiveFile=./DumpSharedDictionary.jsa", - "-Dtest.jdk=" + testjdkPath, + "-Dtest.jdk=" + System.getProperty("test.jdk"), + "-Dcompile.jdk=" + System.getProperty("compile.jdk"), "DumpSharedDictionary", "test"); CDSTestUtils.run(opts) .assertNormalExit();