初始化VM时发生错误无法为对象堆保留足够的空间无法创建Java虚拟机 [英] Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine

查看:2778
本文介绍了初始化VM时发生错误无法为对象堆保留足够的空间无法创建Java虚拟机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个多月后面临这个问题,这是我在命令行上运行java时看到的:

I am facing this problem since more than a month, here is what I see when I run java on command line:

$ java -Xmx1300m 
Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

如果我用较少的内存运行它可以正常工作

If I run with less memory it works fine

$ java -Xmx1240m Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) ..... .....

我花了一个一周试图调试这个并没有任何效果。最后我让我的IT支持人员更换笔记本电脑。这发生在一个月前的10月23日。现在,一个月之后,我的新系统也出现了同样的问题。

I spent a week trying to debug this and nothing worked. Finally I had my IT support guys replace the laptop. This happened a month ago on 10/23. Now, after a month, the same problem is back on my new system.

我的系统配置是:


Win 7 Enterprise(64位),Service Pack 1.英特尔(R)Core(TM)i7-2640M
CPU @ 2.80GHz 8.00 GB RAM

Win 7 Enterprise (64-bit), Service Pack 1. Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz 8.00 GB RAM



Java: java version "1.5.0_20" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02) Java HotSpot(TM) Client VM (build 1.5.0_20-b02, mixed mode)

我们这里有一支约30人的团队,我是唯一一个面对这个的人。所有其他的配置几乎相同,并且工作正常。

We are a team of about 30 guys here and I am the only one facing this. All others have almost the same config and working fine for them.

一个重要的观察结果是Java在一段时间内正常工作,然后一旦出现这个问题就会出现此问题走开,即使我重新安装java。

An important observation is Java works fine for some time and then this problem appears once it appears it doesn't go away, even if I re-install java.

在IT支持人员通过笔记本电脑重新成像之后,我第三次遇到这个问题。它工作了一个月,现在又出现了同样的问题。

I faced this issue the 3rd time after the IT support guys re-imaged by laptop. It worked for a month and now the same problem is back.

每个人都完全无能为力。我现在开始使用2台笔记本电脑。 : - )

Everybody is completely clueless. I have started using 2 laptops now. :-)

推荐答案

尤里卡!最后我找到了一个解决方案。

Eureka ! Finally I found a solution on this.

这是由Windows更新引起的,它阻止任何32位进程在64位计算机上消耗超过1200 MB。唯一可以修复此问题的方法是使用Win 7上的系统还原选项。

This is caused by Windows update that stops any 32-bit processes from consuming more than 1200 MB on a 64-bit machine. The only way you can repair this is by using the System Restore option on Win 7.

开始>>所有程序>>附件>>系统工具>>系统还原。

Start >> All Programs >> Accessories >> System Tools >> System Restore.

然后恢复到Java工作正常的日期。这对我有用。令人惊讶的是,即使禁用所有Windows更新,Windows仍会以关键更新的名义推送系统更新。 ^& %)# * Windows: - )

And then restore to a date on which your Java worked fine. This worked for me. What is surprising here is Windows still pushes system updates under the name of "Critical Updates" even when you disable all windows updates. ^&%)#* Windows :-)

这篇关于初始化VM时发生错误无法为对象堆保留足够的空间无法创建Java虚拟机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆