Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 727
user2847749 Avatar asked Dec 15 '22 21:12

user2847749


2 Answers

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
like image 87
user2847749 Avatar answered May 21 '23 13:05

user2847749


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

like image 41
Mind Peace Avatar answered May 21 '23 12:05

Mind Peace