IntelliJ IDEA – How to pass JVM argument when executing ant

It took me a good hour to find this out.

In your Ant panel, select the build you want to modify and click on properties (the icon with checkboxes).
Go in the excution tab, Ant command line input. This is used to pass ant arguments, but you can also pass java arguments. They say “Use ‘-J’ prefix to specify JVM arguments”. Not very really clear.
The good way to do is for instance

  • Stalokkk


  • hsb

    Thanks much.  It took a long search to find a good example for this. 

  • niccottrell

    The ‘-J prefix’ help text is not good :( Thanks for the examples!

  • Jesse Orloff

    Thank you so much. I spent a couple hours scouring the internet for someone explaining this. This is apparently still poorly documented in IntelliJ IDEA 15.

  • zeflasher

    You’re welcome