eclipse installed but cannot start java returned exit-code = 1

旧街凉风 提交于 2019-12-04 10:24:10
Antoni

What worked for me was to set -vm to point to jvm.dll instead of java.exe or javaw.exe

-vm C:your_java\jre7\bin\client\jvm.dll

It seems a bug with Java 1.7. If you go back to Java 1.6 the problem seems to disappear as well.

Eclipse: Java was started but returned exit code -1073741571

Sorry - a bit too much for a comment - my suggestion:

First of all: I've just tried it with - well - almost the configuration you have (Win8-64bit), but with already a newer java and the SR2 release of Eclipse-DSL. No issues. But I don't think the previous release could be the issue here, but if nothing helps: try downloading the SR2-release.

I know it's all stated in your post, but really make sure you're starting your 64-Bit eclipse with a 64-bit java. Also you always have to provide one of the java.exe, javaw.exe or jvm.dll in the vm-argument, if you provide the vm-argument - not just the java directory.

Also try the following: start with

-vm "<yourjavainstallation>\bin\java.exe" -consoleLog -debug

mind: it is java.exe, not javaw.exe - a console (command window) will appear - maybe the messages will help?

If all fails - try to do it with a 32-bit java and 32-bit eclipse installation. You can use the newest java - JDK 1.6 is not needed. One last point: the required java version=1.5) suggests you have an ancient JDK on your system (if the error message is correct that is). If you still have a JDK 1.4 and older on your system - try to deinstall it, if you really do not need it any more (I wouldn't find a reason what for actually).

One last thing: There is a way to make sure eclipse uses a specified jre without the vm-argument. You can actually copy the needed jre to your eclipse-installation in a sub-folder called "jre" resulting in the following structure:

eclipse
    eclipse.exe
    jre
       bin
          java.exe
          ...
       lib
          ...

and start the eclipse without the vm-argument. I hope one of the points will help!

I have added following lines in eclipse.ini file after openFile.

-vm

C:/Progra~2/Java/jdk1.6.0_27/jre/bin/javaw.exe

Now its working fine.

Omar HossamEldin

It seems that there is a bug happens with JDK 1.7.0_11 (x64). the Solution is in this https://stackoverflow.com/a/14022587/2294985 , Illustrating what to change in the eclipse.ini file

vivekraj

I started getting same error for eclipse after installing QTP on my laptop.

when I tried to run a simple java hello world program from command prompt , I got below error :

c:\Java\test>javac MyFirstApp.java
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar;C:\Users\vivekrs\Documents\Raj\sev2\Tools\
QTP11\QuickTest\MSI\bin\java_shared\bin
Error occurred during initialization of VM
Could not find agent library jvmhook on the library path, with error: %1 is not a valid Win32 application

Then I removed JAVA_TOOL_OPTIONS and _JAVA_OPTIONS variables from Environments and java and Eclipse both started working fine.

you can try type javac in cmd prompt and see what error you are getting, and try to resolve that error, elipse will start working.

Preyas

I have removed this line and works for me in Eclipse Luna:

-XX:-UseCompressedOops
-vm
C:\Program Files\Java\jdk1.7.0_79\jre\bin\server\jvm.dll

I added the line: -XX:-UseCompressedOops

to eclipse.ini and so far so good!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!