使用maven创建jvm时jvm堆的默认大小是多少?

使用maven创建jvm时jvm堆的默认大小是多少?

我正在使用以下命令启动的服务器。

mvn jetty:run

我想停止服务器,但是我无法运行 mvn jetty:stop,甚至无法运行 java -version,为什么?

[mirror@home wpse]$ mvn jetty:stop              /////////////
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
[mirror@home wpse]$ java                     //////////////
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
[mirror@home wpse]$ java -version             ///////////////
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

事实上我仍有大约 50M 的可用内存,为什么我无法运行 java -version?java -version 命令需要多少内存?

Mem:   1048800k total,   993728k used,    55072k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

问题是使用maven创建jvm时jvm堆的默认大小是多少?

如何使用 maven 时让 java 使用更小的堆?

相关内容