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 import java.io.File;
26 import java.nio.charset.Charset;
27 import java.nio.file.Files;
28 import java.nio.file.Path;
29 import java.nio.file.Paths;
30 import java.util.List;
31 import java.util.ArrayList;
32
33 /*
34 * @test
35 * @summary Try to archive lots of classes by searching for classes from the jrt:/ file system. With JDK 12
36 * this will produce an archive with over 30,000 classes.
37 * @requires vm.cds
38 * @library /test/lib /test/hotspot/jtreg/runtime/appcds /test/hotspot/jtreg/runtime/appcds/dynamicArchive/test-classes
39 * @build LoadClasses
40 * @build sun.hotspot.WhiteBox
41 * @modules jdk.jartool/sun.tools.jar
42 * @run driver ClassFileInstaller -jar loadclasses.jar LoadClasses
43 * @run driver ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox
44 * @run driver/timeout=500 DynamicLotsOfClasses
45 */
46
47 public class DynamicLotsOfClasses extends DynamicArchiveTestBase {
48
49 public static void main(String[] args) throws Throwable {
50 runTest(DynamicLotsOfClasses::testDefaultBase);
51 }
52
53 static void testDefaultBase() throws Exception {
54 String topArchiveName = getNewArchiveName("top");
55 try {
56 doTest(topArchiveName);
57 } catch (Throwable th) {
58 System.out.println(th.toString());
|
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 import java.io.File;
26 import java.nio.charset.Charset;
27 import java.nio.file.Files;
28 import java.nio.file.Path;
29 import java.nio.file.Paths;
30 import java.util.List;
31 import java.util.ArrayList;
32
33 /*
34 * @test
35 * @summary Try to archive lots of classes by searching for classes from the jrt:/ file system. With JDK 12
36 * this will produce an archive with over 30,000 classes.
37 * @requires vm.cds
38 * @library /test/lib /test/hotspot/jtreg/runtime/cds /test/hotspot/jtreg/runtime/cds/dynamicArchive/test-classes
39 * @build LoadClasses
40 * @build sun.hotspot.WhiteBox
41 * @modules jdk.jartool/sun.tools.jar
42 * @run driver ClassFileInstaller -jar loadclasses.jar LoadClasses
43 * @run driver ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox
44 * @run driver/timeout=500 DynamicLotsOfClasses
45 */
46
47 public class DynamicLotsOfClasses extends DynamicArchiveTestBase {
48
49 public static void main(String[] args) throws Throwable {
50 runTest(DynamicLotsOfClasses::testDefaultBase);
51 }
52
53 static void testDefaultBase() throws Exception {
54 String topArchiveName = getNewArchiveName("top");
55 try {
56 doTest(topArchiveName);
57 } catch (Throwable th) {
58 System.out.println(th.toString());
|