错误:无法创建 Java 虚拟机。Jboss7 AS服务器启动问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12975357/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error: Could not create the Java Virtual Machine. Jboss7 AS server startup issue
提问by Naju
I'm facing error while starting the JBOSS 7 AS server as below...
我在启动 JBOSS 7 AS 服务器时遇到错误,如下所示...
JBoss Bootstrap Environment
JBOSS_HOME: C:\EAP-6.0.0.GA\jboss-eap-6.0
JAVA: C:\Program Files\Java\jdk1.7.0\bin\java
JBoss Bootstrap 环境
JBOSS_HOME: C:\EAP-6.0.0.GA\jboss-eap-6.0
JAVA: C:\Program Files\Java\jdk1.7.0\bin\java
JAVA_OPTS: -client -Dprogram.name=standalone.bat -Xms1303M -Xmx1303M -XX:MaxPermSize=256M
JAVA_OPTS: -client -Dprogram.name=standalone.bat -Xms1303M -Xmx1303M -XX:MaxPermSize=256M
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.
Press any key to continue . . .
回答by imnd_neel
I was facing the same issue. Based on above comments, I created an environment variable named
JAVA_OPTS
with value
-client -Dprogram.name=standalone.bat -Xms512M -Xmx512M -XX:MaxPermSize=128M
我面临同样的问题。基于以上评论,我创建了一个名为JAVA_OPTS
value
的环境变量
-client -Dprogram.name=standalone.bat -Xms512M -Xmx512M -XX:MaxPermSize=128M
Hope this is more helpful.
希望这更有帮助。
回答by Murali
I set env variable JAVA_OPTS
with value:
我JAVA_OPTS
用值设置 env 变量:
-client -Dprogram.name=standalone.bat -Xms512M -Xmx512M -XX:MaxPermSize=128M
and it worked !
它奏效了!
回答by user2242362
Modify the file run.conf from /bin
从 /bin 修改文件 run.conf
-Xms1303m -Xmx1303m -XX:PermSize=512m -XX:MaxPermSize=1024m
with this:
有了这个:
-Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m