How to tell eclipse to add-exports when compiling

  1. Go to Project > Properties: Java Build Path, tab Libraries
  2. Select the JRE > Is modular node and click Edit…
  3. Go to the tab Details
  4. In the Added exports section click Add…
  5. Enter the following:
    • Source module: jdk.compiler
    • Package: com.sun.tools.javac.tree

enter image description here

Leave a Comment