Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mvn java:exec with increased memory

Tags:

java

maven

I use "mvn exec:java" to run my program:

mvn exec:java -Dexec.mainClass="..." -Dexec.args="..."

I didn't find to change the maximum memory allocation to the JVM.

I tried -Dexec.commandlineArgs="..." but that didn't work...

like image 947
Erel Segal-Halevi Avatar asked Jan 30 '14 22:01

Erel Segal-Halevi


1 Answers

<commandlineArgs> (or -Dexec.args when given in the CLI) is for specifying the arguments given to the program, not the JVM.

As exec:java executes a Java program in the same VM as the Maven one, just change the Maven JVM memory settings (so MAVEN_OPTS) to get more memory for your exec:java command.

like image 143
Tome Avatar answered Oct 19 '22 10:10

Tome