--- old/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java 2016-10-26 11:30:43.000000000 -0700 +++ new/test/java/lang/reflect/Proxy/ProxyClassAccessTest.java 2016-10-26 11:30:42.000000000 -0700 @@ -30,7 +30,7 @@ import java.util.Arrays; import java.util.List; -import static jdk.testlibrary.ProcessTools.executeTestJava; +import jdk.testlibrary.tasks.JavaTask; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -40,7 +40,7 @@ * @test * @library /lib/testlibrary * @modules jdk.compiler - * @build ProxyClassAccessTest q.NP CompilerUtils jdk.testlibrary.* + * @build ProxyClassAccessTest q.NP CompilerUtils jdk.testlibrary.tasks.JavaTask * @run testng ProxyClassAccessTest * @summary Driver for testing proxy class doesn't have access to * types referenced by proxy interfaces @@ -72,21 +72,18 @@ * Run the modular test */ @Test - public void runTest() throws Exception { - int exitValue = executeTestJava("--module-path", MODS_DIR.toString(), - "-m", "test/jdk.test.ProxyClassAccess") - .outputTo(System.out) - .errorTo(System.out) - .getExitValue(); - - assertTrue(exitValue == 0); + public void runTest() { + new JavaTask().ignoreStandardModuleOptions() + .modulePath(MODS_DIR) + .module("test", "jdk.test.ProxyClassAccess") + .run(); } /** * Test unnamed module has no access to other proxy interface */ @Test - public void testNoReadAccess() throws Exception { + public void testNoReadAccess() throws ClassNotFoundException { ModuleFinder finder = ModuleFinder.of(MODS_DIR); Layer bootLayer = Layer.boot(); Configuration cf = bootLayer