JDK-8202999 : Release Note: Removal of sun.misc.Unsafe.defineClass
  • Type: Sub-task
  • Component: core-libs
  • Affected Version: 11
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2018-05-11
  • Updated: 2019-04-09
  • Resolved: 2018-05-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11Resolved
Description
The `sun.misc.Unsafe.defineClass` class has been removed. Users should use the public replacement, `java.lang.invoke.MethodHandles.Lookup.defineClass`, added in Java SE 9. For more details see the Java documentation:

[https://docs.oracle.com/javase/9/docs/api/java/lang/invoke/MethodHandles.Lookup.html#defineClass-byte:A-](https://docs.oracle.com/javase/9/docs/api/java/lang/invoke/MethodHandles.Lookup.html#defineClass-byte:A-)