Oracle has a plan to make Java 9 migration easier
It will be easier to migrate code to the planned Java 9 release, due in late July, if the committee that managed Java approves a proposal just made by Oracle to better accommodate modularity, the key new feature in Java 9. Oracle made the proposal after getting strong opposition to its modularization plans from the Java community
In a proposal floated Thursday, Mark Reinhold, Oracle’s chief Java architect, said strong encapsulation of JDK-internal APIs has caused worries that code that works on JDK 8 will not work on JDK 9 and that no advance warning of this was given in JDK 8. “To help the entire ecosystem migrate to the modular Java platform at a more relaxed pace, I hereby propose to allow illegal reflective access from code on the class path by default in JDK 9, and to disallow it in a future release,” he said.
Under the proposal, the existing “big kill switch” of the
—permit-illegal-access option would become the default behavior of the JDK 9 runtime system, though without as many warnings, Reinhold said. “The current behavior of JDK 9, in which illegal reflective-access operations from code on the class path are not permitted, will become the default in a future release. Nothing will change at compile time.”
The change, Reinhold noted, “will not magically solve every JDK 9 adoption problem.” Concrete types of the built-in class loaders are still different, rt.jar is still gone, the layout of a system image is not the same, and the version string still has a new format.