7 Recurring challenges when running on Java 9 or later
This chapter covers
- Distinguishing standardized, supported, and internal JDK APIs
- Finding dependencies on JDK-internal APIs with JDeps
- Compiling and running code that depends on internal APIs
- Why a split package can make classes invisible
- Mending split packages
Chapter 6 discusses some problems you may come up against when migrating a project to Java 9+. Once you’re done with that, though, you aren’t going to encounter those issues again unless you pick up pre-Java 9 dependencies. This chapter explores two challenges you might still need to deal with:
-
Relying on internal APIs leads to compile errors (section 7.1). This is true for JDK-internal APIs, such as classes from
sun.*
packages ...
Get The Java Module System 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.