test/hotspot/jtreg/runtime/appcds/WrongClasspath.java
changeset 54927 1512d88b24c6
parent 51990 6003e034cdd8
equal deleted inserted replaced
54926:d4e7ccaf1445 54927:1512d88b24c6
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 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.
    45     TestCommon.testDump(appJar, TestCommon.list("Hello"));
    45     TestCommon.testDump(appJar, TestCommon.list("Hello"));
    46 
    46 
    47     // Then try to execute the archive without -classpath -- it should fail
    47     // Then try to execute the archive without -classpath -- it should fail
    48     TestCommon.run(
    48     TestCommon.run(
    49         /* "-cp", appJar, */ // <- uncomment this and the execution should succeed
    49         /* "-cp", appJar, */ // <- uncomment this and the execution should succeed
       
    50         "-Xlog:cds",
    50         "Hello")
    51         "Hello")
    51       .assertAbnormalExit("Unable to use shared archive",
    52         .assertAbnormalExit("Unable to use shared archive",
    52                           "shared class paths mismatch");
    53                             "shared class paths mismatch");
    53   }
    54   }
    54 }
    55 }