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.
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
!).
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
.