mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8049367: Modular Run-Time Images
Co-authored-by: Alan Bateman <alan.bateman@oracle.com> Co-authored-by: Alex Buckley <alex.buckley@oracle.com> Co-authored-by: Bradford Wetmore <bradford.wetmore@oracle.com> Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com> Co-authored-by: James Laskey <james.laskey@oracle.com> Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com> Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com> Co-authored-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com> Co-authored-by: Mandy Chung <mandy.chung@oracle.com> Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com> Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com> Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com> Reviewed-by: jlahoda, ksrini
This commit is contained in:
parent
f141ae6666
commit
8bc2b3ff3a
80 changed files with 2575 additions and 2861 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2013, 2014, 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
|
||||
|
@ -25,8 +25,13 @@
|
|||
* @test
|
||||
* @bug 8006263
|
||||
* @summary Supplementary test cases needed for doclint
|
||||
* @library /tools/lib
|
||||
* @build ToolBox
|
||||
* @run main PathsTest
|
||||
*/
|
||||
|
||||
import com.sun.tools.javac.util.Context;
|
||||
import com.sun.tools.javac.file.JavacFileManager;
|
||||
import com.sun.tools.doclint.DocLint;
|
||||
import com.sun.tools.doclint.DocLint.BadArgs;
|
||||
import java.io.File;
|
||||
|
@ -35,6 +40,8 @@ import java.io.IOException;
|
|||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.tools.StandardLocation;
|
||||
import javax.tools.JavaFileManager;
|
||||
|
||||
public class PathsTest {
|
||||
public static void main(String... args) throws Exception {
|
||||
|
@ -56,9 +63,11 @@ public class PathsTest {
|
|||
|
||||
test("src/Test.java", "-sourcepath", "src1" + PS + "src2");
|
||||
test("src/Test.java", "-classpath", "classes1" + PS + "classes2");
|
||||
|
||||
File testJar = createJar();
|
||||
String sysBootClassPath = System.getProperty("sun.boot.class.path");
|
||||
test("src/Test.java", "-bootclasspath",
|
||||
sysBootClassPath + PS + "classes1" + PS + "classes2");
|
||||
testJar + PS + "classes1" + PS + "classes2");
|
||||
|
||||
if (errors > 0)
|
||||
throw new Exception(errors + " errors found");
|
||||
|
@ -87,6 +96,17 @@ public class PathsTest {
|
|||
}
|
||||
}
|
||||
|
||||
File createJar() throws IOException {
|
||||
File f = new File("test.jar");
|
||||
try (JavaFileManager fm = new JavacFileManager(new Context(), false, null)) {
|
||||
ToolBox tb = new ToolBox();
|
||||
tb.new JarTask(f.getPath())
|
||||
.files(fm, StandardLocation.PLATFORM_CLASS_PATH, "java.lang.*")
|
||||
.run();
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
void compile(String... args) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (args[i].equals("-d")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue