< prev index next >

test/hotspot/jtreg/runtime/cds/dynamicArchive/UnusedCPDuringDump.java

Print this page




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 /*
  26  * @test
  27  * @summary non-empty dir in -cp should be fine during dump time if only classes
  28  *          from the system modules are being loaded even though some are
  29  *          defined to the PlatformClassLoader and AppClassLoader.
  30  * @requires vm.cds
  31  * @library /test/lib /test/hotspot/jtreg/runtime/appcds
  32  * @modules jdk.jartool/sun.tools.jar
  33  * @compile ../test-classes/Hello.java
  34  * @run main/othervm -Dtest.cds.copy.child.stdout=false UnusedCPDuringDump
  35  */
  36 
  37 import java.io.File;
  38 
  39 public class UnusedCPDuringDump extends DynamicArchiveTestBase {
  40 
  41     public static void main(String[] args) throws Exception {
  42         runTest(UnusedCPDuringDump::testDefaultBase);
  43     }
  44 
  45     static void testDefaultBase() throws Exception {
  46         String topArchiveName = getNewArchiveName("top");
  47         doTest(topArchiveName);
  48     }
  49 
  50     private static void doTest(String topArchiveName) throws Exception {
  51         File dir = new File(System.getProperty("user.dir"));




  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 /*
  26  * @test
  27  * @summary non-empty dir in -cp should be fine during dump time if only classes
  28  *          from the system modules are being loaded even though some are
  29  *          defined to the PlatformClassLoader and AppClassLoader.
  30  * @requires vm.cds
  31  * @library /test/lib /test/hotspot/jtreg/runtime/cds
  32  * @modules jdk.jartool/sun.tools.jar
  33  * @compile ../test-classes/Hello.java
  34  * @run main/othervm -Dtest.cds.copy.child.stdout=false UnusedCPDuringDump
  35  */
  36 
  37 import java.io.File;
  38 
  39 public class UnusedCPDuringDump extends DynamicArchiveTestBase {
  40 
  41     public static void main(String[] args) throws Exception {
  42         runTest(UnusedCPDuringDump::testDefaultBase);
  43     }
  44 
  45     static void testDefaultBase() throws Exception {
  46         String topArchiveName = getNewArchiveName("top");
  47         doTest(topArchiveName);
  48     }
  49 
  50     private static void doTest(String topArchiveName) throws Exception {
  51         File dir = new File(System.getProperty("user.dir"));


< prev index next >