equal
deleted
inserted
replaced
32 */ |
32 */ |
33 |
33 |
34 import java.security.ProtectionDomain; |
34 import java.security.ProtectionDomain; |
35 import java.io.InputStream; |
35 import java.io.InputStream; |
36 import jdk.test.lib.InMemoryJavaCompiler; |
36 import jdk.test.lib.InMemoryJavaCompiler; |
37 import jdk.test.lib.unsafe.UnsafeHelper; |
|
38 import jdk.internal.misc.Unsafe; |
37 import jdk.internal.misc.Unsafe; |
39 import static jdk.test.lib.Asserts.*; |
38 import static jdk.test.lib.Asserts.*; |
40 |
39 |
41 public class DefineClass { |
40 public class DefineClass { |
42 public static void main(String args[]) throws Exception { |
41 public static void main(String args[]) throws Exception { |
43 Unsafe unsafe = UnsafeHelper.getUnsafe(); |
42 Unsafe unsafe = Unsafe.getUnsafe(); |
44 TestClassLoader classloader = new TestClassLoader(); |
43 TestClassLoader classloader = new TestClassLoader(); |
45 ProtectionDomain pd = new ProtectionDomain(null, null); |
44 ProtectionDomain pd = new ProtectionDomain(null, null); |
46 |
45 |
47 byte klassbuf[] = InMemoryJavaCompiler.compile("TestClass", "class TestClass { }"); |
46 byte klassbuf[] = InMemoryJavaCompiler.compile("TestClass", "class TestClass { }"); |
48 |
47 |