Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell eclipse to add-exports when compiling

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: enter image description here

Note that I tried to add those to the VM options of one of my unit tests but that did not work.

like image 755
Luke Avatar asked Jan 07 '19 05:01

Luke


1 Answers

  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

like image 85
howlger Avatar answered Sep 28 '22 02:09

howlger