Eclipse error: 'Failed to create the Java Virt

2019-01-01 04:45发布

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

Failed to create the Java Virtual Machine

Enter image description here

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:

  1. Adding the full path to javaw.exe -vm P:\Programs\jdk1.6\bin\\bin\javaw.exe
  2. Removing the -vm option altogether
  3. Removing --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors
  4. Removing the value 512 of --launcher.XXMaxPermSize fixes the issue, but it causes permgen errors
  5. Reducing -Xmx to 512m also fixes the issue.

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

标签: eclipse jvm
30条回答
ら面具成の殇う
2楼-- · 2019-01-01 05:22

I know this is pretty old now but I have just had the same issue and the problem was I was allocating to much memory to eclipse that it could not get hold of. So open eclipse.ini and lower the amount of memory that is being allocated to -Xmx XXMaxPermSize I changed mine to -Xmx512m and XXMaxPermSize256m

查看更多
孤独总比滥情好
3楼-- · 2019-01-01 05:23

I removed eclipse.ini. I encountered this issue and removing the ini file solved it.

查看更多
唯独是你
4楼-- · 2019-01-01 05:23

STEPS TO SOLVE THE ISSUE :-

  1. Open the eclipse.ini file from your eclipse folder.

  2. It has some of add on configuration . Find the line –launcher.XXMaxPermSize.It will be the last line in this file. Now remove/delete the the default value 256m and save it.

查看更多
时光乱了年华
5楼-- · 2019-01-01 05:24

Try removing the -vm P:\Programs\jdk1.6\bin lines.


Also, a general recommendation: set -Dosgi.requiredJavaVersion=1.6, not 1.5.

查看更多
宁负流年不负卿
6楼-- · 2019-01-01 05:24

Some time it's not your eclipse.ini; it's your JDK which is crashed. You can check it by writing following command in a command prompt:

c:\> java -version

If this command shows the following error:

Error occurred during initialization of VM

java/lang/NoClassDefFoundError: java/lang/Object

Then first uninstall JDK and reinstall it.

Eclipse will be in action again ;) As today I have got the same problem, and the above is suggested by Itachi Uchiha.

查看更多
骚的不知所云
7楼-- · 2019-01-01 05:25
-vm D:\Java\jdk1.6.0_29\bin\javaw.exe
查看更多
登录 后发表回答