How to tell eclipse to add-exports when compiling
eclipse, java, java-9, javac
Solution
- Go to Project > Properties: Java Build Path, tab Libraries
- Select the JRE > Is modular node and click Edit...
- Go to the tab Details
- In the Added exports section click Add...
- Enter the following:
- Source module: `jdk.compiler`
- Package: `com.sun.tools.javac.tree`
Problem
Is it possible to tell eclipse to add the following command line option: ` --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED ` when compiling. I think it may also be needed when running tests. Is it also possible to remove this message: Note that I tried to add those to the VM options of one of my unit tests but that did not work.