36.6 Migrating Code to Java 9
Many pre-Java-9 apps will run unaltered on Java 9. In fact, as we prepared this book, we tested every app using JDK 9 and they all compiled and ran without issue. In Java 9, all programs are compiled and executed using the module system. Java 9 strongly encapsulates types that are not exported by modules, so it’s possible that some apps will fail to compile because types that were accessible to them prior to Java 9 no longer are. For example, there are many pre-Java-9 internal APIs that were not meant for use outside the JDK, but were in fact used outside the JDK—many of these are not exported in Java 9 and thus are inaccessible.19 If your code uses such internal APIs directly or indirectly, it will fail to compile. ...
Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.