java 虚拟机 初始化,初始化VM时发生错误无法为对象堆保留足够的空间无法创建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) ..... .....

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.

My system configuration is:

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)

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.

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.

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.

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

解决方案

Eureka ! Finally I found a solution on this.

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.

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 :-)

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值