无法创建的java虚拟机,Eclipse错误:“无法创建Java虚拟机”

I am getting this error message when I start Eclipse Helios on Windows 7:

Failed to create the Java Virtual Machine

YYgjc.png

My eclipse.ini looks as follows:

-startup

plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar

-vm

P:\Programs\jdk1.6\bin

--launcher.library

plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503

-product

org.eclipse.epp.package.jee.product

--launcher.defaultAction

openFile

-showsplash

org.eclipse.platform

--launcher.XXMaxPermSize

512m

--launcher.defaultAction

openFile

-vmargs

-Dosgi.requiredJavaVersion=1.5

-Xms120m

-Xmn100m

-Xmx1024m

My JAVA_HOME is correctly set as far as I can tell. How can I fix this?

Things I have tried so far:

Adding the full path to javaw.exe

-vm

P:\Programs\jdk1.6\bin\\bin\javaw.exe

Removing the -vm option altogether

Removing --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors

Removing the value 512 of --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors

Reducing -Xmx to 512m also fixes the issue.

Why can I not use '1024m' for '-Xmx' and '--launcher.XXMaxPermSize'?

解决方案

1. Open the eclipse.ini file from your eclipse folder,see the picture below.

zL3HQ.jpg

2. Open eclipse.ini in Notepad or any other text-editor application, Find the line -Xmx256m (or -Xmx1024m). Now change the default value 256m (or 1024m) to 512m. You also need to give the exact java installed version (1.6 or 1.7 or other).

jhQjF.jpg

Like This:

-Xmx512m

-Dosgi.requiredJavaVersion=1.6

OR

-Xmx512m

-Dosgi.requiredJavaVersion=1.7

OR

-Xmx512m

-Dosgi.requiredJavaVersion=1.8

Then it works well for me.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值