--- old/test/tools/jmod/JmodNegativeTest.java 2016-10-11 11:00:37.000000000 -0700 +++ new/test/tools/jmod/JmodNegativeTest.java 2016-10-11 11:00:37.000000000 -0700 @@ -24,8 +24,8 @@ /* * @test * @library /lib/testlibrary - * @modules jdk.jlink/jdk.tools.jmod - * jdk.compiler + * @modules jdk.compiler + * jdk.jlink * @build jdk.testlibrary.FileUtils CompilerUtils * @run testng JmodNegativeTest * @summary Negative tests for jmod @@ -39,6 +39,7 @@ import java.util.List; import java.util.function.Consumer; import java.util.function.Supplier; +import java.util.spi.ToolProvider; import java.util.zip.ZipOutputStream; import jdk.testlibrary.FileUtils; import org.testng.annotations.BeforeTest; @@ -51,6 +52,8 @@ public class JmodNegativeTest { + static final ToolProvider JMOD_TOOL = ToolProvider.findFirst("jmod").get(); + static final String TEST_SRC = System.getProperty("test.src", "."); static final Path SRC_DIR = Paths.get(TEST_SRC, "src"); static final Path EXPLODED_DIR = Paths.get("build"); @@ -515,7 +518,7 @@ ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); System.out.println("jmod " + Arrays.asList(args)); - int ec = jdk.tools.jmod.Main.run(args, ps); + int ec = JMOD_TOOL.run(ps, ps, args); return new JmodResult(ec, new String(baos.toByteArray(), UTF_8)); }