Home Can't start Eclipse - Java was started but returned exit code=13

# Can't start Eclipse - Java was started but returned exit code=13

Ben E.
1#
Ben E. Published in 2012-07-12 22:23:31Z
 I am trying to get my first taste of Android development using Eclipse. I ran into this problem when trying to run Eclipse, having installed version 4.2 only minutes ago. After first trying to start Eclipse without any parameters to specify the Java VM, I got an error message saying it couldn't find a Java VM called javaw.exe inside the Eclipse folder, so I found where Java was installed and specified that location as the parameter in the shortcut's target. Now I get a different error, "Java was started but returned exit code=13". Similar questions seem to indicate that it's a 32-bit/64-bit conflict, but I'm 99% positive that I downloaded 64-bit versions of both Eclipse and Java (RE 7u5), which I chose because I have 64-bit Windows 7. If anyone knows how to confirm that my Eclipse and Java are 64-bit, that'd be appreciated. If you think my problem is a different one, please help! Please speak as plainly as you can, as I am totally new to Eclipse and Java. Shortcut Target: "C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\eclipse.exe" -vm "C:\Program Files (x86)\Java\jre7\bin\javaw.exe" Full error code...: Java was started but returned exit code=13 C:\Program Files (x86)\Java\jre7\bin\javaw.exe -Xms40m -Xmx512m -XX:MaxPermSize=256m -jar C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar -os win32 -ws win32 -arch x86_64 -showsplash C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins\org.eclipse.platform_4.2.0.v201206081400\splash.bmp -launcher C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\eclipse.exe -name Eclipse --launcher.library C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v201205221813\eclipse_1503.dll -startup C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar --launcher.overrideVmargs -exitdata 1e30_5c -vm C:\Program Files (x86)\Java\jre7\bin\javaw.exe -vmargs -Xms40m -Xmx512m -XX:MaxPermSize=256m -jar C:\Program Files\Eclipse-SDK-4.2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar 
RubioRic
2#
 Working combinations of OS, JDK and eclipse bitness. In my case, I was using 64-bit JDK with 32-bit eclipse in a 64-bit OS. After downgrading JDK to 32-bit eclipse started working. Kindly use 1 of the following combinations. 32-bit OS , 32-bit JDK , 32-bit Eclipse (32-bit only) 64-bit OS , 32-bit JDK , 32-bit Eclipse 64-bit OS , 64-bit JDK , 64bit Eclipse (64-bit only) Hope this helps you.
DNA
3#
 Your version of Eclipse is 64-bit, based on the paths and filenames. However, the version of Java that it's picking up is 32-bit, as indicated by where it is coming from, on this line: -vm C:\Program Files (x86)\Java\jre7\bin\javaw.exe  Program Files (x86) is the folder where 64-bit Windows places 32-bit programs. Program Files is the folder where 64-bit Windows places 64-bit programs. This can happen when a system has more than one JVM installed, as is often the case on Windows 64-bit (for example, the JRE download page uses the bit-ness of the browser to determine what bit-ness download to offer you, and many people use(d) 32-bit browsers even though they run 64-bit Windows). The best way to fix this, assuming you do in fact have 64-bit JRE or JDK on your system, is to specify in eclipse.ini exactly which JVM you want it to use. The instructions are detailed in the Eclipse wiki page, but basically you have to specify the -vm option in the ini file - make sure to read the wiki page carefully as the format is very specific. Specifying the JVM path in eclipse.ini is strongly recommended because doing so isolates Eclipse from any potential changes to your system PATH that some program installers might make (I'm talking to you, Oracle!). Another option would be to download and use 32-bit Eclipse instead of 64-bit, but it's still strongly recommended to specify the path to the JVM in eclipse.ini. Left for historical reference: To check your version of Java, run  java -version  in a console (command prompt). On Windows 7 with 64-bit Java 6 I get:  java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)  Note the 3rd line, which shows that this is a 64-bit version. On a 32-bit version you'll get something like:  Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing) 
Peter Mortensen
4#
Peter Mortensen Reply to 2016-12-30 23:15:51Z
 It could be due to less memory. You can modify the eclipse.ini file to increase the memory. Something like this might help you: FAQ How do I increase the heap size available to Eclipse?
Peter Mortensen
5#
Peter Mortensen Reply to 2016-12-30 23:16:37Z
 The solution is simple: Put the "eclipse" folder on "c:/Program Files". If it does not work, put it in "c:/Program Files (x86)".
Peter Mortensen
6#
Peter Mortensen Reply to 2016-12-30 23:16:57Z
 The strangest fix ever. Look at your Eclipse path, and make sure you do not have strange characters (like !, #, and @). It worked for me.
Peter Mortensen
7#
Peter Mortensen Reply to 2016-12-30 23:18:53Z
 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. Next I added a line to file eclipse.ini → C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe. That worked for me.
Smi
8#
 Make sure you don't have special characters (%, \$, #, etc.) at Eclipse path.
Peter Mortensen
9#
Peter Mortensen Reply to 2016-12-30 23:25:41Z
 I had the same problem. I was using Windows 8 with a 64-bit OS. I just changed the path to Program Files (x86) and then it started work. I put this line in the eclipse.ini file: -vm C:\Program Files (x86)\Java\jre7\bin\javaw.exe 
Peter Mortensen
10#
Peter Mortensen Reply to 2016-12-30 23:27:09Z
 I uninstalled Java update 25, and the issue was solved.
Peter Mortensen
11#
Peter Mortensen Reply to 2016-12-30 23:28:47Z
 This might happen if you have several versions of Java on the same machine. To fix this I did the following: Checked the current JAVA_HOME value. In Windows, echo %JAVA_HOME% Accessed the route of javaw.exe Replaced the shortcuts pointing to the Java home location.
Peter Mortensen
12#
Peter Mortensen Reply to 2016-12-30 23:30:15Z
 If you install a 64-bit Eclipse version on a PC with a 32-bit JRE this is guaranteed to occur. So the solution is quite straightforward: You need to synchronise them by updating either one. This shall happen when downloading Oracle Fusion middleware and Eclipse expects a 32-bit environment while your JRE is 64-bit and your JAVA home is pointing to a 64-bit JDK.
Community
13#
 I found I had installed 32-bit Eclipse by mistake, and was trying to use it with a 64-bit JRE, which is why I got this error. To see whether you have 32 or 64 bit Eclipse installed, see this answer: https://stackoverflow.com/a/9578565/191761
Jaswanth Kumar
14#
Jaswanth Kumar Reply to 2014-10-30 14:06:09Z
 If you have recently installed Java 8 and uninstalled Java 7, install JDK 8 and retry.
Peter Mortensen
15#
Peter Mortensen Reply to 2016-12-30 23:37:11Z
 I got this error and found that my PATH variable (on Windows) was probably changed. First in my PATH was this entry: C:\ProgramData\Oracle\Java\javapath  ...and Eclipse ran "C:\ProgramData\Oracle\Java\javapath\javaw" - which gave the error. I suspect that this is something that came along with an installation of Java 8. I have several Java versions installed (6,7 and 8), so I removed that entry from the PATH and tried to restart Eclipse again, which worked fine. Instructions on how to edit PATH variable
Peter Mortensen
16#
Peter Mortensen Reply to 2016-12-30 23:38:03Z
 I have just solved the same issue upon setting up my Windows 8.1 PC. Exactly like @George Papatheodorou mentioned above (sorry I cannot add a comment), Eclipse and JRE must be both 64 bit or 32 bit. However, it seems for Windows 8/8.1 environment, you are going to get 32-bit JRE by default (and I do not know where to change that default for the download), as explained here: http://java.com/en/download/faq/win8_faq.xml I was using 64-bit Eclipse so there was a discrepancy. I then installed 32-bit Eclipse and everything works fine this time. So before bothering changing any environment variables, check your JRE and Eclipse version. Of course you can use 64-bit JRE with 64-bit Eclipse. Just make sure they match because Windows 8.1 will give you 32-bit by default.
Peter Mortensen
17#
Peter Mortensen Reply to 2016-12-30 23:38:40Z
 I was facing the same issue. I had installed version 8 and update 25 32 bit. To fix, install Java SE Development Kit 7 Update 71 (64 bit). Then through appwiz.cpl, delete the other version i.e. Java Update 25. Done.
Peter Mortensen
18#
Peter Mortensen Reply to 2016-12-30 23:39:55Z
 I tried some of the solutions, but not worked for me. Finally, I found another way, ... Go to Environment Variables → System Variables Set C:\Program Files\Java\jdk1.7.0_02\bin\javaw.exe to the path in the system variables. Try it. It worked for me...
RustyIngles
19#
 For me the solution was to go into (on Windows 8.1): System > Advanced system setting > Environment Variables  Under 'System variables' in the 'Path' variable there was the following first: C:\ProgramData\Oracle\Java\javapath;  I removed this and Eclipse worked again!
Peter Mortensen
20#
Peter Mortensen Reply to 2016-12-30 23:41:23Z
 The issue was fixed by doing the following steps. Eclipse finds the JAVA executables from 'C:\ProgramData\Oracle\Java\javapath' The folder structure will contain shortcuts to the below executables, i. java.exe ii. javaw.exe iii. javaws.exe For me the executable paths were pointing to my Program Files(x86) (home for 32 bit applications) folder location I corrected it to Program Files (which homes 64-bit applications) and the issue got resolved Please find the screenshot for the same.
Peter Mortensen
21#
Peter Mortensen Reply to 2016-12-30 23:43:28Z
 I had an x64 bit JDK. There was nothing in my path settings. So I installed the x86 JDK. This solved my problem perfectly.
Peter Mortensen
22#
Peter Mortensen Reply to 2016-12-30 23:44:21Z
 I tried the following solution: I created a shortcut of javaw.exe from path C:\Program Files\Java\jdk1.7.0_71\bin and pasted it into the path C:\ProgramData\Oracle\Java\javapath. After that, I launched Eclipse, and it worked for me.
Peter Mortensen
23#
Peter Mortensen Reply to 2016-12-30 23:45:16Z
 If nothing works, then the last solution you can try is to completely uninstall Java from your computer and then install it again, and make sure the path variables are set correctly.
mtyson
24#
 I had this issue. I installed Java 8 update 25 via Chrome, and therafter attempting to start Eclipse gave the mentioned error. Uninstalled that update, and Eclipse works again.
Peter Mortensen
25#
Peter Mortensen Reply to 2016-12-30 23:46:53Z
 I had a similar error after installing Java 8 on my Windows 7 system, 64 bit system. Changing environment variables, etc. did not help. So I tried to remove the Java Update 8, but that too did not help. Downloading and installing the 64-bit version of Java 8 SDK fixed my problem. I hope this helps.
Peter Mortensen
26#
Peter Mortensen Reply to 2016-12-30 23:48:28Z
 I had the same issue after I upgraded my JDK from 1.7 to 1.8. I'm using Eclipse 4.4 (Luna). The error is gone after I degrade JDK to 1.7.
Peter Mortensen
27#
Peter Mortensen Reply to 2016-12-30 23:49:37Z
 The best answer here is too long. I cannot comment so I added my answer. Go here: http://www.oracle.com/technetwork/java/javase/downloads/index.html Download the latest SDK (of course for x64 if your computer is x64) Install it Now the party is finished, and it's time to work with Eclipse ;)
Peter Mortensen
28#
Peter Mortensen Reply to 2016-12-30 23:51:04Z
 A clean reinstall of the Java JDK did the trick in my case. I am running Eclipse 4.4 (Luna) like a charm now.
Patricia Beier
29#
Patricia Beier Reply to 2015-02-21 13:49:43Z
 I had this message when I had forgot to install the JDK.
Peter Mortensen
30#
Peter Mortensen Reply to 2016-12-31 00:00:54Z
 I also encountered the same issue. It turned out that the environment variable Path was pointing to an incorrect Java version. Please check the environment variable and point it to the correct Java. For example: C:\Program Files (x86)\Java\jdk1.6.0_17\bin  To check the environment variable, go to: Computer → properties → Advanced system settings → Advanced -> Environment variables 
TastyCode
31#
 Adding vm argument to .ini file worked for me -vm C:\Program Files\Java\jdk1.7.0_65\bin\javaw.exe