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 If -Djava.system.class.loader=xxx is specified in command-line, disable archived non-system classes
28 * @requires vm.cds
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * jdk.jartool/sun.tools.jar
32 * @compile test-classes/TestClassLoader.java
33 * @compile test-classes/ReportMyLoader.java
34 * @compile test-classes/TrySwitchMyLoader.java
35 * @run main SpecifySysLoaderProp
36 */
37
38 import java.io.*;
39 import jdk.test.lib.process.OutputAnalyzer;
40
41 public class SpecifySysLoaderProp {
42
43 public static void main(String[] args) throws Exception {
44 JarBuilder.build("sysloader", "TestClassLoader", "ReportMyLoader", "TrySwitchMyLoader");
45
46 String jarFileName = "sysloader.jar";
47 String appJar = TestCommon.getTestJar(jarFileName);
48 TestCommon.testDump(appJar, TestCommon.list("ReportMyLoader"));
49 String warning = "VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified";
50
51
52 // (0) Baseline. Do not specify -Djava.system.class.loader
53 // The test class should be loaded from archive
54 TestCommon.run(
55 "-verbose:class",
|
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 If -Djava.system.class.loader=xxx is specified in command-line, disable archived non-system classes
28 * @requires vm.cds
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * jdk.jartool/sun.tools.jar
32 * @compile test-classes/TestClassLoader.java
33 * @compile test-classes/ReportMyLoader.java
34 * @compile test-classes/TrySwitchMyLoader.java
35 * @run driver SpecifySysLoaderProp
36 */
37
38 import java.io.*;
39 import jdk.test.lib.process.OutputAnalyzer;
40
41 public class SpecifySysLoaderProp {
42
43 public static void main(String[] args) throws Exception {
44 JarBuilder.build("sysloader", "TestClassLoader", "ReportMyLoader", "TrySwitchMyLoader");
45
46 String jarFileName = "sysloader.jar";
47 String appJar = TestCommon.getTestJar(jarFileName);
48 TestCommon.testDump(appJar, TestCommon.list("ReportMyLoader"));
49 String warning = "VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified";
50
51
52 // (0) Baseline. Do not specify -Djava.system.class.loader
53 // The test class should be loaded from archive
54 TestCommon.run(
55 "-verbose:class",
|