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 /*
26 * @test
27 * @requires vm.cds
28 * @summary a patched class found in --patch-module should be used at runtime
29 * @library ../..
30 * @library /test/hotspot/jtreg/testlibrary
31 * @library /test/lib
32 * @modules java.base/jdk.internal.misc
33 * jdk.jartool/sun.tools.jar
34 * @build PatchMain
35 * @run main TwoJars
36 */
37
38 import java.io.File;
39 import jdk.test.lib.compiler.InMemoryJavaCompiler;
40 import jdk.test.lib.process.OutputAnalyzer;
41
42 public class TwoJars {
43 private static String moduleJar;
44 private static String moduleJar2;
45
46 public static void main(String args[]) throws Throwable {
47
48 // Create a class file in the module java.naming. This class file
49 // will be put in the javanaming.jar file.
50 String source = "package javax.naming.spi; " +
51 "public class NamingManager { " +
52 " static { " +
53 " System.out.println(\"I pass!\"); " +
54 " } " +
55 "}";
|
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 /*
26 * @test
27 * @requires vm.cds
28 * @summary a patched class found in --patch-module should be used at runtime
29 * @library ../..
30 * @library /test/hotspot/jtreg/testlibrary
31 * @library /test/lib
32 * @modules java.base/jdk.internal.misc
33 * jdk.jartool/sun.tools.jar
34 * @build PatchMain
35 * @run driver TwoJars
36 */
37
38 import java.io.File;
39 import jdk.test.lib.compiler.InMemoryJavaCompiler;
40 import jdk.test.lib.process.OutputAnalyzer;
41
42 public class TwoJars {
43 private static String moduleJar;
44 private static String moduleJar2;
45
46 public static void main(String args[]) throws Throwable {
47
48 // Create a class file in the module java.naming. This class file
49 // will be put in the javanaming.jar file.
50 String source = "package javax.naming.spi; " +
51 "public class NamingManager { " +
52 " static { " +
53 " System.out.println(\"I pass!\"); " +
54 " } " +
55 "}";
|