简体   繁体   中英

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: 在此处输入图片说明

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

  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

在此处输入图片说明

You can add the --add-exports jdk.compiler/.... options on VM Arguments as shown below. 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM