diff --git a/jdk/test/java/util/jar/JarFile/MultiReleaseJarAPI.java b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java similarity index 100% rename from jdk/test/java/util/jar/JarFile/MultiReleaseJarAPI.java rename to jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarAPI.java diff --git a/jdk/test/java/util/jar/JarFile/MultiReleaseJarHttpProperties.java b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarHttpProperties.java similarity index 96% rename from jdk/test/java/util/jar/JarFile/MultiReleaseJarHttpProperties.java rename to jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarHttpProperties.java index 50cec677ee6..9cff19fcfb3 100644 --- a/jdk/test/java/util/jar/JarFile/MultiReleaseJarHttpProperties.java +++ b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarHttpProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -26,6 +26,9 @@ * @bug 8132734 * @summary Test the System properties for JarFile that support multi-release jar files * @library /lib/testlibrary/java/util/jar + * @modules jdk.jartool + * jdk.compiler + * jdk.httpserver * @build Compiler JarBuilder CreateMultiReleaseTestJars SimpleHttpServer * @run testng MultiReleaseJarHttpProperties * @run testng/othervm -Djdk.util.jar.version=0 MultiReleaseJarHttpProperties diff --git a/jdk/test/java/util/jar/JarFile/MultiReleaseJarIterators.java b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarIterators.java similarity index 100% rename from jdk/test/java/util/jar/JarFile/MultiReleaseJarIterators.java rename to jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarIterators.java diff --git a/jdk/test/java/util/jar/JarFile/MultiReleaseJarProperties.java b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarProperties.java similarity index 100% rename from jdk/test/java/util/jar/JarFile/MultiReleaseJarProperties.java rename to jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarProperties.java diff --git a/jdk/test/java/util/jar/JarFile/MultiReleaseJarSecurity.java b/jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarSecurity.java similarity index 100% rename from jdk/test/java/util/jar/JarFile/MultiReleaseJarSecurity.java rename to jdk/test/java/util/jar/JarFile/mrjar/MultiReleaseJarSecurity.java diff --git a/jdk/test/java/util/jar/JarFile/mrjar/TEST.properties b/jdk/test/java/util/jar/JarFile/mrjar/TEST.properties new file mode 100644 index 00000000000..da021032d94 --- /dev/null +++ b/jdk/test/java/util/jar/JarFile/mrjar/TEST.properties @@ -0,0 +1,3 @@ +modules = \ + jdk.compiler \ + jdk.jartool diff --git a/jdk/test/lib/testlibrary/java/util/jar/Compiler.java b/jdk/test/lib/testlibrary/java/util/jar/Compiler.java index 4b56cac5184..2892291c9c3 100644 --- a/jdk/test/lib/testlibrary/java/util/jar/Compiler.java +++ b/jdk/test/lib/testlibrary/java/util/jar/Compiler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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 @@ -44,7 +44,7 @@ class Compiler { // so do it the old fashioned way // options = Arrays.asList("-release", String.valueOf(release)); String target = String.valueOf(release); - options = Arrays.asList("-source", target, "-target", target); + options = Arrays.asList("-source", target, "-target", target, "-classpath", ""); return this; } @@ -53,7 +53,9 @@ class Compiler { Map cfos = createClassFileObjects(); JavaCompiler jc = ToolProvider.getSystemJavaCompiler(); JavaFileManager jfm = new CustomFileManager(jc.getStandardFileManager(null, null, null), cfos); - jc.getTask(null, jfm, null, options, null, cunits).call(); + if(!jc.getTask(null, jfm, null, options, null, cunits).call()) { + throw new RuntimeException("Compilation failed"); + } return createOutput(cfos); }