test/hotspot/jtreg/runtime/appcds/jigsaw/modulepath/JvmtiAddPath.java
changeset 54927 1512d88b24c6
parent 52316 3152b928769d
equal deleted inserted replaced
54926:d4e7ccaf1445 54927:1512d88b24c6
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, 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.
   119         System.out.println("Test case 1: not adding module path - Hello.class should not be found");
   119         System.out.println("Test case 1: not adding module path - Hello.class should not be found");
   120         run(check_appcds_enabled, appJar,
   120         run(check_appcds_enabled, appJar,
   121             "-Xlog:class+load", "JvmtiApp", "noadd", MAIN_CLASS); // appcds should be enabled
   121             "-Xlog:class+load", "JvmtiApp", "noadd", MAIN_CLASS); // appcds should be enabled
   122 
   122 
   123         System.out.println("Test case 2: add to boot classpath only - should find Hello.class in boot loader");
   123         System.out.println("Test case 2: add to boot classpath only - should find Hello.class in boot loader");
   124         run(check_appcds_disabled, appJar,
   124         String[] toCheck = TestCommon.isDynamicArchive() ? check_appcds_enabled :
       
   125                            check_appcds_disabled;
       
   126         run(toCheck, appJar,
   125             "-Xlog:class+load=trace",
   127             "-Xlog:class+load=trace",
   126             modulePath,
   128             modulePath,
   127             "JvmtiApp", "bootonly", addbootJar, MAIN_CLASS); // appcds should be disabled
   129             "JvmtiApp", "bootonly", addbootJar, MAIN_CLASS); // appcds should be disabled
   128 
   130 
   129         System.out.println("Test case 3: add to app classpath only - should find Hello.class in app loader");
   131         System.out.println("Test case 3: add to app classpath only - should find Hello.class in app loader");