Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 888 Bytes

java-9-support.md

File metadata and controls

16 lines (9 loc) · 888 Bytes

Java 9+ Support

With the rise of Project Jigsaw, Java has become much more encapsulated. This includes locking away internal code behind the JPMS, thankfully, the compiler contains a few options to allow you to access internal parts of the code.

New TreeMaker Location

TreeMaker no longer exists as part of tools.jar as the file is no longer shipped with the JDK, but instead is part of the jdk.compiler module (NOT java.compiler!).

Compiler Options

add-exports is a new compiler option that allows you to export a module and it's members, this makes it available to be used in your code.

The settings you'll want to use are:
--add-exports jdk.compiler/com.sun=ALL-UNNAMED

This is due to our project requiring com.sun.tools and com.sun.source.