Eclipse returns error message "Java was started but returned exit code = 1"

This is a picture of the error code

Here is the content of the error message:

Java was started but returned exit code=1

C:\WINDOWS\system32\javaw.exe
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-Declipse.buildId=v22.0.5-757759
-XX:MaxPermSize=256m
-jar
D:\Programming\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-os win32
-ws win32
-arch x86_64
-showsplash
-launcher
D:\Programming\adt-bundle-windows-x86_64-20130729\eclipse\eclipse.exe
-name Eclipse
--launcher.library
D:\Programming\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.ecl
ipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807\eclipse_1503
.dll
-startup
D:\Programming\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.overrideVmargs
-exitdata 1c50_48
-product com.android.ide.eclipse.adt.package.product
-vm C:\WINDOWS\system32\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-Declipse.buildId=v22.0,5-757759
-XX:MaxPermSize=256m
-jar
D:\Pragramming\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar

I just downloaded and dearchived android SDK for Windows. I`m currently using W8 64x.


Solution 1:

The error message points to a problem with your Java version. Do you have a JDK installed?

Try adding the following (noting the new line):

/!\ make sure, that the -vm option occurs before the -vmargs command. Everything after -vmargs is passed directly to the JVM.

-vm 
c:/wherever/java/jdk1.6.0_21/jre/bin/server/jvm.dll
-vmargs... 

...to your eclipse.ini file, pointing to the JDK you want to use, and check that the required Java version is at least as new as your JDK. This is the path for a Windows system. More on paths can be found here (scroll down).

If you don't know where the eclipse.ini file is: regularly it is in the folder of your eclipse.exe.

Edit2: @KadoLakatt: the reason why installing the latest Java Version worked for you is because Eclipse checks the standard path for a JVM if it doesn't find a -vm entry (see here). However I'd not recommend that, since you might be wrong guessing the JVM used. If you update Java (automatically?) you might run into problems in your Eclipse wondering what you might have changed. Better set it to a specific folder in your eclipse.ini to be certain.

Solution 2:

I received this error out of the blue. Eclipse stopped working even though I made no config changes and did not install any new jdk's.

Here was my eclipse.ini file :

--clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:/Program Files (x86)/Java/jre7/bin/javaw.exe
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx1024m

To get Eclipse to start successfully I removed

    -vmargs
    -Dosgi.requiredJavaVersion=1.6
    -vm 
C:/Program Files (x86)/Java/jre7/bin/javaw.exe

So here is my updated file :

--clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-Xms40m
-Xmx1024m

I have no idea why removing osgi.requiredJavaVersion=1.6 fixed this as my jvm version is 1.6. From the doc http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html

osgi.requiredJavaVersion
The minimum java version that is required to launch Eclipse. The default value is "1.4.1".

I think my java version was set correctly. Anyway Eclipse starts and runs for me now......

Solution 3:

it can be like this as well:

-vm 
C:\Program Files\Java\jre6\bin\server\jvm.dll

Solution 4:

Working combinations of OS, JDK and eclipse bitness.

  • 32-bit OS , 32-bit JDK , 32-bit Eclipse (32-bit only)
  • 64-bit OS , 32-bit JDK , 32-bit Eclipse
  • 64-bit OS , 64-bit JDK , 64bit Eclipse (64-bit only)

Kindly use 1 of the above combinations.