61 public class LoaderSegregationTest { |
61 public class LoaderSegregationTest { |
62 public static void main(String[] args) throws Exception { |
62 public static void main(String[] args) throws Exception { |
63 String wbJar = JarBuilder.build(true, "WhiteBox", "sun/hotspot/WhiteBox"); |
63 String wbJar = JarBuilder.build(true, "WhiteBox", "sun/hotspot/WhiteBox"); |
64 String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar; |
64 String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar; |
65 |
65 |
66 String appJar = JarBuilder.build("LoaderSegregation_app", "LoaderSegregation", |
66 String appJar = JarBuilder.build("LoaderSegregation_app", "LoaderSegregation", "LoaderSegregation$1", |
67 "CustomLoadee", "CustomLoadee2", "CustomLoadee3Child", "CustomInterface2_ia", |
67 "CustomLoadee", "CustomLoadee2", "CustomLoadee3Child", "CustomInterface2_ia", |
68 "OnlyBuiltin", "Util"); |
68 "OnlyBuiltin", "Util"); |
69 |
69 |
70 String app2Jar = JarBuilder.build("LoaderSegregation_app2", "CustomLoadee3", "CustomInterface2_ib"); |
70 String app2Jar = JarBuilder.build("LoaderSegregation_app2", "CustomLoadee3", "CustomInterface2_ib"); |
71 |
71 |
108 // command-line arguments ... |
108 // command-line arguments ... |
109 use_whitebox_jar); |
109 use_whitebox_jar); |
110 |
110 |
111 output = TestCommon.exec(TestCommon.concatPaths(appJar, app2Jar), |
111 output = TestCommon.exec(TestCommon.concatPaths(appJar, app2Jar), |
112 // command-line arguments ... |
112 // command-line arguments ... |
113 "--add-opens=java.base/java.lang=ALL-UNNAMED", |
|
114 "--add-opens=java.base/java.security=ALL-UNNAMED", |
|
115 use_whitebox_jar, |
113 use_whitebox_jar, |
116 "-XX:+UnlockDiagnosticVMOptions", |
114 "-XX:+UnlockDiagnosticVMOptions", |
117 "-XX:+WhiteBoxAPI", |
115 "-XX:+WhiteBoxAPI", |
118 "LoaderSegregation", customJarPath); |
116 "LoaderSegregation", customJarPath); |
119 TestCommon.checkExec(output); |
117 TestCommon.checkExec(output); |