Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java was started but returned with exit code=1

I am receiving error called - Java was started but returned with exit code=1

Updated Error image after installing JDK

I have received this error after upgrading my java. I can see my ini file has below content.

 -startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
-vm C:\Program Files (x86)\Java\jdk1.8.0_73\jre\bin\server\jvm.dll
-vmargs
-Dfile.encoding=UTF-8
-Xms512m
-Xmx1536m
-XX:MaxPermSize=512m
[email protected]/AnypointStudio/workspace

JAVA_HOME has value as C:\Program Files (x86)\Java\jdk1.8.0_73 Path env has value as C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Java\jre1.8.0_73\bin;C:\Program Files (x86)\Java\jdk1.8.0_73\bin;

My new updated jre is in below location. C:\Program Files (x86)\Java\jre1.8.0_73\bin

Note that i found many solutions for this issue in this site which are not working for me. Kindly guide me where i am doing wrong.

like image 339
Simbu Avatar asked Mar 22 '16 17:03

Simbu


4 Answers

Change the path in the .ini-file.

-vm
C:\Program Files\Java\JDK1.8.0_172\bin\javaw.exe 

if you still see the issue Change it into:

-vm
C:\Program Files\Java\jdk1.8.0_172\jre\bin\server\jvm.dll

Note: The path should be in the new line after -vm.

like image 172
sudhakkar k Avatar answered Nov 14 '22 12:11

sudhakkar k


You need only JRE to be able to run Eclipse but of course to be able to compile Java code you need JDK.

It is recommended to use JDK for Java_Home, in case you will continue using the JRE you must set set the JAVA_HOME to "C:\Program Files (x86)\Java\jre1.8.0_73".

One of the tricks to copy JRE1.8.0_73 directory to eclipse directory and rename it to jre. This will be used by eclipse default even if there is multiple JRE installed on your environment.

Last point, make sure that you restore memory setting in config.ini (xms, xmx, MaxPermSize) to default values. MaxPermSize will be ignored by Java8 JVM but you can keep it.

like image 27
Ahmed Hashim Avatar answered Nov 14 '22 12:11

Ahmed Hashim


I had same issue today with Eclipse Neon.2 after java jre was updated in Chrome Browser from 1.8.0_111 to 1.8.0.131. It looks to me it removed 64 bits version of 1.8.0_111 and installed only 32 bits version of jre 1.8.0.131.

To fix this issue I had to update JDK from 1.8.0_111(64) -> 1.8.0.131(64). This installed as well jre on 64 bits and Eclipse Neon.2 started successfully this time.

like image 37
aprodan Avatar answered Nov 14 '22 13:11

aprodan


I had exactly similar error. Eclipse worked well after I deleted 'javapath' folder from C:\ProgramData\Oracle\Java directory.

like image 28
NabRaj_Baitadi Avatar answered Nov 14 '22 13:11

NabRaj_Baitadi