Blog

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
-J-Xmx1024m
-J-XX:PermSize=1024m

  • Stalokkk

    Thanks!!!

  • 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!