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 Initiating and defining classloader test.
28 * @requires vm.cds
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * java.management
32 * jdk.jartool/sun.tools.jar
33 * @compile test-classes/Hello.java
34 * @compile test-classes/HelloWB.java
35 * @compile test-classes/ForNameTest.java
36 * @compile test-classes/BootClassPathAppendHelper.java
37 * @build sun.hotspot.WhiteBox
38 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
39 * @run main ClassLoaderTest
40 */
41
42 import java.io.File;
43 import jdk.test.lib.process.OutputAnalyzer;
44
45 public class ClassLoaderTest {
46 public static void main(String[] args) throws Exception {
47 JarBuilder.build(true, "ClassLoaderTest-WhiteBox", "sun/hotspot/WhiteBox");
48 JarBuilder.getOrCreateHelloJar();
49 JarBuilder.build("ClassLoaderTest-HelloWB", "HelloWB");
50 JarBuilder.build("ClassLoaderTest-ForName", "ForNameTest");
51 ClassLoaderTest test = new ClassLoaderTest();
52 test.testBootLoader();
53 test.testDefiningLoader();
54 }
55
56 public void testBootLoader() throws Exception {
57 String appJar = TestCommon.getTestJar("ClassLoaderTest-HelloWB.jar");
58 String appClasses[] = {"HelloWB"};
59 String whiteBoxJar = TestCommon.getTestJar("ClassLoaderTest-WhiteBox.jar");
|
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 Initiating and defining classloader test.
28 * @requires vm.cds
29 * @library /test/lib
30 * @modules java.base/jdk.internal.misc
31 * java.management
32 * jdk.jartool/sun.tools.jar
33 * @compile test-classes/Hello.java
34 * @compile test-classes/HelloWB.java
35 * @compile test-classes/ForNameTest.java
36 * @compile test-classes/BootClassPathAppendHelper.java
37 * @build sun.hotspot.WhiteBox
38 * @run driver ClassFileInstaller sun.hotspot.WhiteBox
39 * @run driver ClassLoaderTest
40 */
41
42 import java.io.File;
43 import jdk.test.lib.process.OutputAnalyzer;
44
45 public class ClassLoaderTest {
46 public static void main(String[] args) throws Exception {
47 JarBuilder.build(true, "ClassLoaderTest-WhiteBox", "sun/hotspot/WhiteBox");
48 JarBuilder.getOrCreateHelloJar();
49 JarBuilder.build("ClassLoaderTest-HelloWB", "HelloWB");
50 JarBuilder.build("ClassLoaderTest-ForName", "ForNameTest");
51 ClassLoaderTest test = new ClassLoaderTest();
52 test.testBootLoader();
53 test.testDefiningLoader();
54 }
55
56 public void testBootLoader() throws Exception {
57 String appJar = TestCommon.getTestJar("ClassLoaderTest-HelloWB.jar");
58 String appClasses[] = {"HelloWB"};
59 String whiteBoxJar = TestCommon.getTestJar("ClassLoaderTest-WhiteBox.jar");
|