mvn java:exec具有增加的内存 [英] mvn java:exec with increased memory
问题描述
我使用"mvn exec:java"运行我的程序:
I use "mvn exec:java" to run my program:
mvn exec:java -Dexec.mainClass="..." -Dexec.args="..."
我没有发现要更改对JVM的最大内存分配.
I didn't find to change the maximum memory allocation to the JVM.
我尝试了-Dexec.commandlineArgs ="...",但那没有用...
I tried -Dexec.commandlineArgs="..." but that didn't work...
推荐答案
<commandlineArgs>
(或CLI中给出的 -Dexec.args )用于指定提供给程序而不是JVM的参数.
<commandlineArgs>
(or -Dexec.args when given in the CLI) is for specifying the arguments given to the program, not the JVM.
由于 exec:java在与Maven相同的VM中执行Java程序,只需更改Maven JVM内存设置(因此 MAVEN_OPTS )即可获得更多内存您的exec:java命令.
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.
这篇关于mvn java:exec具有增加的内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!