< prev index next >
test/hotspot/jtreg/runtime/cds/appcds/RewriteBytecodesTest.java
Print this page
@@ -22,18 +22,18 @@
*
*/
/*
* @test
- * @summary Use ClassLoader.defineClass() to load a class with rewritten bytecode. Make sure
+ * @summary Use Lookup.defineClass() to load a class with rewritten bytecode. Make sure
* the archived class with the same name is not loaded.
* @requires vm.cds
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* jdk.jartool/sun.tools.jar
- * @compile test-classes/RewriteBytecodes.java test-classes/Util.java test-classes/Super.java test-classes/Child.java
+ * @compile test-classes/RewriteBytecodes.java test-classes/Util.java test-classes/Super.java test-classes/Child.java test-classes/Hello.java
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run driver RewriteBytecodesTest
*/
@@ -43,20 +43,19 @@
public class RewriteBytecodesTest {
public static void main(String[] args) throws Exception {
String wbJar = JarBuilder.build(true, "WhiteBox", "sun/hotspot/WhiteBox");
String use_whitebox_jar = "-Xbootclasspath/a:" + wbJar;
- String appJar = JarBuilder.build("dynamic_define", "RewriteBytecodes", "Util", "Super", "Child");
+ String appJar = JarBuilder.build("dynamic_define", "RewriteBytecodes", "Util", "Super", "Child", "Hello");
String superClsFile = (new File(System.getProperty("test.classes", "."), "Super.class")).getPath();
TestCommon.dump(appJar, TestCommon.list("RewriteBytecodes", "Super", "Child"),
// command-line arguments ...
use_whitebox_jar);
OutputAnalyzer output = TestCommon.exec(appJar,
// command-line arguments ...
- "--add-opens=java.base/java.lang=ALL-UNNAMED",
use_whitebox_jar,
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
"RewriteBytecodes", superClsFile);
TestCommon.checkExec(output);
< prev index next >