Eclipse installed but cannot start java return exit-code = 1

I recently installed eclipse-dsl-juno-SR1-win32-x86_64 and after extracting the files, when I started running Eclipse, it gave me the following error:

Java was running, but returned exit code = 1 (version java = 1.5 required)

I checked the reason for this, and also tried to reinstall, as well as the solutions offered by other discussion forums, but to no avail.

I have installed

  • Eclipse IDE for Java and DSL developers: eclipse-dsl-juno-SR1-win32-x86_64 in Eclipse Juno SR1 packages AND
  • JDK 1.7.0_11 (x64)

I bound my environment variables correctly and tried to compile a Java file via cmd and succeed.

I tried running cmd command: -vm "mypath\jdk1.7.0_11\jre\bin" as suggested forums

as well as other paths -vm "mypath\jdk1.7.0_11\bin" -vm "mypath\jdk1.7.0_11\jre\bin\javaw.exe" even -vm "mypath\jre6\bin" from despair to no avail.

Please help me with this. I am stuck: (

+4
source share
7 answers

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

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

There seems to be a bug with Java 1.7. If you return to Java 1.6, the problem will also disappear.

Eclipse: Java was running but exit code -1073741571 returned

+4
source

Sorry - too much for comment - my suggestion is:

First of all: I just tried - well, almost you have a configuration (Win8-64bit), but with a newer version of java and SR2 for Eclipse-DSL. No questions. But I don’t think that the previous release might be the problem here, but if all else fails: try downloading SR2-release.

I know that all of this is indicated in your post, but really make sure you run your 64-bit eclipse using 64-bit Java. Also, you always need to provide one of 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: this is java.exe , not javaw.exe - a console (command window) will appear - maybe messages will help?

If all else fails, try doing it with 32-bit Java and 32-bit eclipse. You can use the latest java - JDK 1.6 is not required. The last paragraph: required java version=1.5) assumes that you have an ancient JDK on your system (if the error message is correct). If you still have JDK 1.4 and older on your system, try uninstalling it if you really don’t need it (I would not find the reason that it really is).

Last: there is a way to make sure that eclipse uses the specified jre without the vm argument. In fact, you can copy the necessary jre into your eclipse installation into a subfolder called "jre", which will lead to the following structure:

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

and run the eclipse without the vm argument. I hope one of the points helps!

+2
source

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

-vm

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

Now it works fine.

+2
source

It seems that an error has occurred with JDK 1.7.0_11 (x64). The solution is in this fooobar.com/questions/1466604 / ... , illustrating what needs to be changed in the eclipse.ini file

+1
source

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

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

 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 deleted the JAVA_TOOL_OPTIONS and _JAVA_OPTIONS variables from the environment, and java and Eclipse started working fine.

you can try javac type on cmd command line and see what error you get and try to resolve this error, elipse will start working.

+1
source

I deleted this line and worked for me in Eclipse Luna:

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

I added the line: -XX: -UseCompressedOops

for eclipse.ini and still so good!

0
source

All Articles