Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse gives “Java was started but returned exit code 13” [duplicate]

Tags:

java

eclipse

jvm

All hell broke loose after i uninstalled my java 6 and installed java 7 (both jdk and jre). On opening eclipse it gave the error that "No JVM found at.....". So, i explicitly gave the location of javaw.exe as

-vm 

C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe

in the eclipse.ini file. Now it says "Java was started but returned exit code 13". Also, in the elispse.ini file i changed -Dosgi.requiredJavaVersion=1.5 to -Dosgi.requiredJavaVersion=1.7

There are many solutions online like :

MyEclipse 10 does not start "Java was started but returned exit code 13"

but none of them works. Any insight?

like image 443
Farrukh Chishti Avatar asked Nov 01 '13 05:11

Farrukh Chishti


People also ask

How do I fix exit code 13 in eclipse?

This error occurs because your Eclipse version is 64-bit. You should download and install 64-bit JRE and add the path to it in eclipse.

How do I fix Java exit code 13?

I had the same issue, Java was started but returned exit code=13. My solution was to create an environment variable to Windows properties variable name = PATH variable value = C:\Program Files\Java\jdk1. 7.0_02\bin, not to C:\Program Files (x86)\Java\jre7\bin.

Where can I find eclipse INI file?

For windows, it's in the same directory as eclipse.exe file, as shown in below image. You can reach this location by first right clicking on Eclipse app and click on “Show Package Contents” and then in the next window navigate to Contents/Eclipse directory, as shown in below images.


2 Answers

if you have updated your jdk to 7 you are most likely to face this problem.

This happens mainly due to:

  1. incompatible sdk and jdk versions
  2. using a 32 bit java version for your 64 bit eclipse JVM (programfilex86-java)

WHAT YOU HAVE TO DO : firstly check the eclipse.ini file to see if you have a path that is pointing to your jdk it should look something like this

-vm     C:\Program Files\Java\blah\blah\blah\javaw.exe     

if not then locate the jdk 7 javaw.exe file
sample :

C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe  

paste -vm and the path below it into your eclipse.ini file

-vm   C:\Program Files\Java\jdk1.7.0_45\jre\bin\javaw.exe         

make sure that you type the above just before the -vmargs and after the OpenFile

like image 170
user3807936 Avatar answered Oct 16 '22 10:10

user3807936


This problem happened because either u install new version of jdk so you have both 32bit version and 64bit

how to solve the problem is just go open computer & go to c then you will see location

after that you probably use 32 bit so just chose C:\Program Files and there you will find folder called java

in it location 2

so you have many different version of jdk so easily chose jre7 and to to bin and you will find javaw.exe in it like loaction 3

now only just take that path copy and go to start type eclipse.ini you will see text file just open it and before -vmargs

write -vm enter path like photo finally

now just open eclipse again and have fun :D

like image 43
Mohamed Adel Avatar answered Oct 16 '22 12:10

Mohamed Adel