简体   繁体   English

VM初始化期间发生错误

[英]Error occured during initialization of the VM

I lanched the command mvn -version just after reboot and I got: 重新启动后,我挂了命令mvn -version ,我得到了:

Apache Maven 3.3.1 (cab6659f9874fa96462afef40fcf6bc033d58c1c; 2015-03-13T21:10:2
7+01:00)
Maven home: C:\apache-maven-3.3.1\bin\..
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.7.0_45\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 8", version: "6.2", arch: "x86", family: "windows"

and then lanched on my directory project the command: 然后将命令放在我的目录项目中:

  mvn -o clean install 

and I got 我得到了

Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

After when I rexecute the command "mvn -version" I got the same error Any ideas why I got this strange behavior and how can I fix it? 当我重新执行命令“ mvn -version”后,我得到了相同的错误。有任何想法为什么我会出现这种奇怪的行为以及如何解决它? I already set the Maven variable: 我已经设置了Maven变量:

 MAVEN_OPTS = -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m

Thanks in advance for your help! 在此先感谢您的帮助!

行尾是否有引号?

MAVEN_OPTS = -Xmx1024m -XX:MaxPermSize=512m"

The error message means that you have not enough RAM to run the JVM with your requested memory settings. 该错误消息表示您没有足够的RAM来使用请求的内存设置来运行JVM。 Probably after booting there are not many other applications running and so there are 1.5 GB RAM left, but after a while with additional programs running the requested 1.5 GB RAM are not accessible anymore. 引导之后,可能没有多少其他应用程序在运行,因此剩余了1.5 GB RAM,但是过了一段时间,运行了所要求的1.5 GB RAM的其他程序将无法访问。 Try reducing your setting, eg to: 尝试减少设置,例如:

MAVEN_OPTS = -Xmx256m -XX:MaxPermSize=64m

This should be enough for running maven -version . 这对于运行maven -version应该足够了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM