【问题标题】:How to compile Java code with formal parameters information (-parameters compiler arg) in Intellij如何在 Intellij 中使用形式参数信息(-parameters compiler arg)编译 Java 代码
【发布时间】:2017-04-13 07:50:59
【问题描述】:

按照教程https://docs.oracle.com/javase/tutorial/reflect/member/methodparameterreflection.html

我应该使用 -parameters 选项告诉 java 编译器将形式参数名称存储在特定的 .class 文件中

Maven 编译器可以按如下方式指示:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <compilerArgument>-parameters</compilerArgument>
    </configuration>
</plugin>

如何在 Intellij IDEA 中做到这一点,以便默认使用它?

请注意,-parameters 不是 VM 选项

【问题讨论】:

  • 发帖前有没有做研究?

标签: java intellij-idea compilation


【解决方案1】:

您必须打开设置,找到 java 编译器选项并为其添加“-parameters”。

【讨论】:

  • 是的,我试图这样做,但杰克逊没有接受它。现在它是。谢谢
猜你喜欢
  • 1970-01-01
  • 2018-04-23
  • 2019-04-12
  • 1970-01-01
  • 2020-02-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多