diff --git a/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java b/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java index 99701aebb61739bbbc5d75c3b3bd7595a495cd3d..d1f9633ebe6a25be1a63e3624d8de6fb9ea5514f 100644 --- a/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java +++ b/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.java @@ -39,12 +39,13 @@ import jdk.testlibrary.ProcessTools; * @test * @bug 6434402 8004926 * @library /lib/testlibrary + * @build jdk.testlibrary.ProcessTools * @build TestManager TestApplication CustomLauncherTest * @run main/othervm CustomLauncherTest * @author Jaroslav Bachorik */ public class CustomLauncherTest { - private static final String TEST_CLASSES = System.getProperty("test.classes"); + private static final String TEST_CLASSPATH = System.getProperty("test.class.path"); private static final String TEST_JDK = System.getProperty("test.jdk"); private static final String TEST_SRC = System.getProperty("test.src"); @@ -82,7 +83,7 @@ public class CustomLauncherTest { } public static void main(String[] args) throws Exception { - if (TEST_CLASSES == null || TEST_CLASSES.isEmpty()) { + if (TEST_CLASSPATH == null || TEST_CLASSPATH.isEmpty()) { System.out.println("Test is designed to be run from jtreg only"); return; } @@ -139,8 +140,8 @@ public class CustomLauncherTest { System.out.println("========================="); System.out.println(" launcher : " + LAUNCHER); System.out.println(" libjvm : " + libjvmPath.toString()); - System.out.println(" classpath : " + TEST_CLASSES); - ProcessBuilder server = new ProcessBuilder(LAUNCHER, libjvmPath.toString(), TEST_CLASSES, "TestApplication"); + System.out.println(" classpath : " + TEST_CLASSPATH); + ProcessBuilder server = new ProcessBuilder(LAUNCHER, libjvmPath.toString(), TEST_CLASSPATH, "TestApplication"); final AtomicReference port = new AtomicReference<>(); final AtomicReference pid = new AtomicReference<>(); @@ -169,7 +170,7 @@ public class CustomLauncherTest { ProcessBuilder client = ProcessTools.createJavaProcessBuilder( "-cp", - TEST_CLASSES + + TEST_CLASSPATH + File.pathSeparator + TEST_JDK + File.separator + diff --git a/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java b/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java index a929855a8c591673575ecde5fafc0532125776ad..efe2a317139c10b7cf7f4fa0cd72ffc29dac13a4 100644 --- a/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java +++ b/test/sun/management/jmxremote/bootstrap/LocalManagementTest.java @@ -41,6 +41,7 @@ import java.util.concurrent.atomic.AtomicReference; * without connection or username/password details. * TestManager will attempt a connection to the address obtained from * both agent properties and jvmstat buffer. + * @build jdk.testlibrary.ProcessTools * @build TestManager TestApplication * @run main/othervm/timeout=300 LocalManagementTest */ @@ -48,7 +49,7 @@ import java.util.concurrent.atomic.AtomicReference; import jdk.testlibrary.ProcessTools; public class LocalManagementTest { - private static final String TEST_CLASSES = System.getProperty("test.classes"); + private static final String TEST_CLASSPATH = System.getProperty("test.class.path"); private static final String TEST_JDK = System.getProperty("test.jdk"); public static void main(String[] args) throws Exception { @@ -109,7 +110,7 @@ public class LocalManagementTest { "com.sun.management.jmxremote.authenticate=false," + "com.sun.management.jmxremote.ssl=false", "-cp", - TEST_CLASSES, + TEST_CLASSPATH, "TestApplication", "-exit" ); @@ -163,7 +164,7 @@ public class LocalManagementTest { private static boolean doTest(String testId, String arg) throws Exception { List args = new ArrayList<>(); args.add("-cp"); - args.add(TEST_CLASSES); + args.add(TEST_CLASSPATH); if (arg != null) { args.add(arg); @@ -202,7 +203,7 @@ public class LocalManagementTest { ProcessBuilder client = ProcessTools.createJavaProcessBuilder( "-cp", - TEST_CLASSES + + TEST_CLASSPATH + File.pathSeparator + TEST_JDK + File.separator +