Java was started but returned with exit code=1

Viewed 47193

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
-Dosgi.instance.area.default=@user.home/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.

7 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.

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

In my case the error was pretty silly: in the config.ini there was an error in the last line where the memory parameter -Xmx was set to "2024". I'm pretty sure I did not edit that line by hand. I reverted it to -Xmx1024m to make it work

-Xmx2024m

changed to

-Xmx1024m

the issue seems to be related to the Java vm 1.8.131 (32bit) that responds with an error any time I try to ask more than 1477m, even when I have more than 4GB of free ram:

java -Xmx1477m
Error occurred during initialization of VM
Could not reserve enough space for 1513472KB object heap

on the same PC a JDK 1.7 does not have any issues in using 2GB

Related