Reputation: 407
My understanding is that com.sun.* API that is currently restricted but still used for JavaFX controls will no longer be accessible as and when Java9 is released; however, the ‘skin’ API will be made public or otherwise accessible so that this change will effectively apply only to the ‘behavior’ API. This view is based on my reading of the most recent update for JEP 253 (two weeks old so relatively recent). For those having more experience with JavaFX and its evolutionary process than I (that doesn’t require much), is it safe to assume that current ‘skin’ API will remain accessible (and become non-restricted)? I don’t expect any guarantees, but if this is an iffy proposition then a best-guess estimate of what might happen would be appreciated.
Thanks in advance for any response!
Upvotes: 0
Views: 618
Reputation: 209245
As JEP 253 states:
With the forthcoming release of Java 9, and in particular with the introduction of strong boundaries between modules in Project Jigsaw, developers will find that their code will no longer compile or run since the com.sun.* packages will no longer be accessible.
In order to provide some support for developers who have subclassed the skin classes in com.sun.javafx.scene.control.skin
, these classes will be moved to a public package javafx.scene.control.skin
in JavaFX 9. The JEP is not shy about stating that this is to support developers who have ignored official advice about using these classes in the first place.
The JEP also states
The intention is to move many JavaFX control skins into the appropriate public package, most probably
javafx.scene.control.skin
. There is no intent to also move the related behavior classes.
This means that the behavior classes will remain in the non-public API and thus will become inaccessible in Java 9. Skin classes will move to a different package, so code that relies on the current com.sun.javafx.scene.control.skin
package will not compile or run in Java 9, but can be modified to do so. Code that relies on the behavior classes will not compile or run, and will not be able to be modified to do so.
The JEP lists classes that have been moved. Also, current early access API documentation for JavaFX 9, with the skin classes moved to javafx.scene.control.skin
can be seen here.
Upvotes: 1