10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 8197532
27 * @modules jdk.compiler
28 * jdk.jlink
29 * jdk.zipfs
30 * @library src /lib/testlibrary
31 * @build java.json/*
32 * @run main DefaultModules
33 * @summary Test that all modules that export an API are in the set of modules
34 * resolved when compiling or running code on the class path
35 */
36
37 import java.io.PrintStream;
38 import java.nio.file.Files;
39 import java.nio.file.Path;
40 import java.lang.module.ModuleDescriptor;
41 import java.lang.module.ModuleFinder;
42 import java.lang.module.ModuleReference;
43 import java.util.spi.ToolProvider;
44
45 import jdk.testlibrary.ProcessTools;
46 import jdk.testlibrary.OutputAnalyzer;
47
48 /**
49 * This test compiles and runs the following tests on the class path:
50 *
51 * TestRootModules.java.java - tests that every module that exports an API
52 * is resolved. Also tests that java.se is not resolved.
53 *
54 * TestJson.java - exercises APIs exported by the java.json module. The
55 * java.json module is not a Java SE module.
56 */
57
58 public class DefaultModules {
59 private static final PrintStream out = System.out;
60
61 public static void main(String[] args) throws Exception {
62 String javaHome = System.getProperty("java.home");
63 String testSrc = System.getProperty("test.src");
64
65 // $JDK_HOME/bin/java TestModules.java
66 String source = Path.of(testSrc, "src", "TestRootModules.java").toString();
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @bug 8197532
27 * @modules jdk.compiler
28 * jdk.jlink
29 * jdk.zipfs
30 * @library src /test/lib
31 * @build java.json/*
32 * @run main DefaultModules
33 * @summary Test that all modules that export an API are in the set of modules
34 * resolved when compiling or running code on the class path
35 */
36
37 import java.io.PrintStream;
38 import java.nio.file.Files;
39 import java.nio.file.Path;
40 import java.util.spi.ToolProvider;
41
42 import jdk.test.lib.process.ProcessTools;
43
44 /**
45 * This test compiles and runs the following tests on the class path:
46 *
47 * TestRootModules.java.java - tests that every module that exports an API
48 * is resolved. Also tests that java.se is not resolved.
49 *
50 * TestJson.java - exercises APIs exported by the java.json module. The
51 * java.json module is not a Java SE module.
52 */
53
54 public class DefaultModules {
55 private static final PrintStream out = System.out;
56
57 public static void main(String[] args) throws Exception {
58 String javaHome = System.getProperty("java.home");
59 String testSrc = System.getProperty("test.src");
60
61 // $JDK_HOME/bin/java TestModules.java
62 String source = Path.of(testSrc, "src", "TestRootModules.java").toString();
|