Creating Unsafe part of the core API, and the JLS implementation are separate issues.
Unsafe not part of the Java API because it is unsafe, and Oracle does not want developers to use it.
However, they know well 1) that many good developers have successfully used it, and that 2) many bad developers have abused it. Thus, there is a long-term plan to safely, intelligently and conveniently support the useful features of Unsafe through the underlying Java platform.
You can view the presentation from Mark Reinhold , which explains in more detail how Unsafe will be ported and will eventually go.
However, even when the Unsafe APIs are moved to some java (or javax ) javax , providers will still have inner classes and native code to implement these APIs. For example, Oracle might have something like oracle.internal.misc.StillUnsafe with a bunch of native methods. This class will not be managed by JLS; Oracle will freely implement it as they like, and change it whenever it wants. But with this approach, they would also provide an implementation of the core Java APIs that delegate them to the inner class.
Declaring an API in a java.* Package does not mean that Java runtime authors do not need to provide code to back it up; many Java APIs are abstract and must be provided by the service provider.
source share