[英]Intellij IDEA: Pass java command arguments
I need to pass arguments after java
but before class name at application startup in IDEA
. 我需要在
java
之后但在IDEA
中的应用程序启动时在类名之前传递参数。
In "edit configuration" section "program arguments" adds options after class name. 在“编辑配置”部分,“程序参数”在类名称后添加选项。
I need this because of some features like --add-modules
for java 9+. 我之所以需要它,是因为Java 9+的
--add-modules
等功能。 For example I want to make IDEA
runs this*: 例如,我想让
IDEA
运行以下*:
java --add-modules java.xml.ws com.pany.MainKt
But for now it does this: 但是现在它做到了:
java com.pany.MainKt --add-modules java.xml.ws
*All other arguments generated by IDEA
are omitted for brevity. *为简洁起见,省略了
IDEA
生成的所有其他参数。
JVM参数必须添加到“ VM options”字段中:
java <some intellij stuff> <VM options> <Main class> <Program arguments>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.