Reputation: 940
I need to pass arguments after java
but before class name at application startup in 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+. For example I want to make IDEA
runs this*:
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.
Upvotes: 1
Views: 4171
Reputation: 7519
You can set the VM options
in the Edit configuration
pane. Those will be added before the classname.
Upvotes: 4
Reputation: 779
JVM arguments must be added to the "VM options" field:
java <some intellij stuff> <VM options> <Main class> <Program arguments>
Upvotes: 4