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 * @summary Ensure that a newly introduced java.base package placed within the --patch-module
27 * directory is considered part of the boot loader's visibility boundary
28 * @requires !(os.family == "windows")
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * java.management
32 * @run main/othervm PatchModuleVisibility
33 */
34
35 import java.io.File;
36 import java.nio.file.Files;
37 import java.nio.file.Paths;
38
39 import jdk.test.lib.compiler.InMemoryJavaCompiler;
40 import jdk.test.lib.process.OutputAnalyzer;
41 import jdk.test.lib.process.ProcessTools;
42
43 public class PatchModuleVisibility {
44
45 public static void main(String[] args) throws Throwable {
46
47 String Vis2_B_src =
48 "package p2;" +
49 "public class Vis2_B {" +
50 " public void m() {" +
51 " System.out.println(\"In B's m()\");" +
52 " }" +
|
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 * @summary Ensure that a newly introduced java.base package placed within the --patch-module
27 * directory is considered part of the boot loader's visibility boundary
28 * @requires !(os.family == "windows")
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * java.management
32 * @run driver PatchModuleVisibility
33 */
34
35 import java.io.File;
36 import java.nio.file.Files;
37 import java.nio.file.Paths;
38
39 import jdk.test.lib.compiler.InMemoryJavaCompiler;
40 import jdk.test.lib.process.OutputAnalyzer;
41 import jdk.test.lib.process.ProcessTools;
42
43 public class PatchModuleVisibility {
44
45 public static void main(String[] args) throws Throwable {
46
47 String Vis2_B_src =
48 "package p2;" +
49 "public class Vis2_B {" +
50 " public void m() {" +
51 " System.out.println(\"In B's m()\");" +
52 " }" +
|