Where to add compiler options like -ea in IntelliJ IDEA?

后端 未结 2 1330
深忆病人
深忆病人 2020-12-01 05:59

I want to add the -ea option. I set it in Project Settings --> Compiler --> Java Compiler : Additional command line

2条回答
  •  春和景丽
    2020-12-01 06:26

    The -ea option to enable assertions is passed to the JVM not to the compiler. Add it as a VM option for your runtime configuration.

    Specific location in the menu: Run > Edit Configurations... > Configuration > VM options:

提交回复
热议问题