Q:

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

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?

A:

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

