Eclipse returned error message “Java was started but returned exit code= 1”

39,789

Solution 1

So I tried everything I could find for like 5 hours, and eventually came across this.... Open your eclipse.ini file. It will open in notebook. Mine is located here D:\eclipse_3.8.1\eclipse

The file starts out looking like this:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx2G

Above -vmargs, add these two lines:

-vm
location of your jdk javaw.exe file

so that it looks like this:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.6.0_45\bin\javaw.exe
-vmargs
-Xms512m
-Xmx2G

Solution 2

In your eclipse.ini file make sure you are pointing -vm to your jdk installation. You will get detail guidline in http://wiki.eclipse.org/Eclipse.ini#-vm_value%3a_Windows_Example

Share:
39,789
user2847749
Author by

user2847749

Updated on July 10, 2022

Comments

  • user2847749
    user2847749 almost 2 years

    enter image description here

    Ok, so I had tried to install a new jdk / jre and suddenly my eclipse will not open. I have tried uninstalling old forms of java and reinstalling the java that I need, and it refuses to open. I've googled this and tried a dozen answers online but none of them work for me. It's extremely frustrating. ideas?