hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java
changeset 46790 8c4deba6a0ee
parent 45112 fbec2bfa3839
equal deleted inserted replaced
46788:fb479838027c 46790:8c4deba6a0ee
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    44                         "        System.out.println(\"I pass!\"); " +
    44                         "        System.out.println(\"I pass!\"); " +
    45                         "    } "                                    +
    45                         "    } "                                    +
    46                         "}";
    46                         "}";
    47 
    47 
    48         ClassFileInstaller.writeClassToDisk("javax/naming/spi/NamingManager",
    48         ClassFileInstaller.writeClassToDisk("javax/naming/spi/NamingManager",
    49              InMemoryJavaCompiler.compile("javax.naming.spi.NamingManager", source, "-Xmodule:java.naming"),
    49              InMemoryJavaCompiler.compile("javax.naming.spi.NamingManager", source, "--patch-module=java.naming"),
    50              "mods/java.naming");
    50              "mods/java.naming");
    51 
    51 
    52         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("--patch-module=java.naming=mods/java.naming",
    52         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("--patch-module=java.naming=mods/java.naming",
    53              "PatchModuleMain", "javax.naming.spi.NamingManager");
    53              "PatchModuleMain", "javax.naming.spi.NamingManager");
    54 
    54