Moving sun.misc.VM

Alan Bateman Alan.Bateman at oracle.com
Wed Jan 20 15:36:48 UTC 2016



On 20/01/2016 15:18, Sanne Grinovero wrote:
> Hello all,
> while testing latest Java 9 build 9-ea+101-2016-01-13-182959.javare.4276.nc with some popular OSS libraries, I noticed that sun.misc.VM is gone and this will cause some issues.
>
> This is causing compilation failures of type "cannot find symbol". Similarly the same projects are using sun.misc.Unsafe, but in that case we're getting a warning "sun.misc.Unsafe is internal proprietary API and may be removed in a future release".
>
> Is it intentional that sun.misc.VM takes a more aggressive migration path than the nice warnings we're getting for Unsafe?
>
sun.misc.VM is not one of the "critical internal APIs" that identified 
in JEP 260 [1]. There is ongoing work (mostly by Chris Hegarty) to move 
the non-critical APIs out of sun.misc and sun.reflect so that all that 
remains is the critical internal APIs.

Are you seeing a lot of usage of sun.misc.VM? If so then best to bring 
usage data to jigsaw-dev to lobby for it to be considered as a critical 
internal API.

-Alan.

[1] http://openjdk.java.net/jeps/260



More information about the core-libs-dev mailing list