简体   繁体   中英

Passing javac arguments in eclipse

In my maven compiler plugin I have the following setting:

 <plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
   <version>${maven-compiler-plugin.version}</version>
   <configuration>
     <source>${java.version}</source>
     <target>${java.version}</target>
     <compilerArgument>-parameters</compilerArgument>
   </configuration>
 </plugin>

Is there a way to pass the -parameters part to the compiler used by eclipse?

In Project > Properties: Java Compiler you have to check the Store information about method parameters (usable via reflection) checkbox for that.

The checkbox should be checked automatically (see fixed Eclipse bug 518218 ). If you are using an outdated version of Eclipse, please upgrade .

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