Can't start Eclipse - Java was started but returned exit code=13
Asked Answered
C

44

1041

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
Crisp answered 12/7, 2012 at 22:23 Comment(5)
"Program Files (x86)" is where Windows tends to put 32-bit stuff these days. I'm not sure exactly how to check your java version, but you can always uninstall and download it fresh.Bowra
See also #4945678 and #6167295 and #8231353Morentz
@user1522092 How the hell did you access the error message text? On my PC it can't be copied, I had to type it on the keyboard...Augmentation
@TomášZato select that error message and use shortcut - Ctrl + C. It will get copied.Fruma
A similar error might also occur "out of nowhere" because of an automatic Java update. DNA's answer helped me in this case, after I (re-?)installed the 32 bit JDK into a directory without spaces and specifying "-vm C:\path_to_jdk\javaw.exe" in the eclipse.iniSalisbarry
T
227

There are working combinations of OS, JDK and Eclipse bitness. In my case, I was using a 64-bit JDK with a 32-bit Eclipse on a 64-bit OS. After downgrading the JDK to 32-bit, Eclipse started working.

Use one 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, 64-bit Eclipse (64-bit only)
Telluride answered 3/1, 2017 at 10:54 Comment(1)
Note that it is ok to have both 32-bit and 64-bit jre installed.Kleiman
M
767

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) 

If you are on a 64-bit machine, then you can install the 64-bit JDK and uninstall the 32-bit one. For instance on Windows 10, just go to Settings and under Apps, you will find Java. Click on it and you will find all the different versions. Now you can select which one to uninstall.

Morentz answered 12/7, 2012 at 22:29 Comment(22)
Well 3rd comment helped me. I didn't understand what the hell is "Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)". Now i know i have to download java-64bitHen
how do i do this, i am having same problem and cant understand what you mean by calling it explicitly, do u mean like from the command promptLeukas
Yes, from the command prompt (using the file path shown in your error message, not necessarily the example I gave!)Morentz
Hello, I am having the same problem, so I used this command as you mentioned, but it open a dialog box with the error : Could not create a Java Virtual Machine, a fatal exception has occurred. Could you please help with this?Planck
See this question (#25609905) and check you are typing the command correctly. Otherwise, I suggest you start a new question with your specific problem.Morentz
can someone tell me what to type. Nm, eclipse.exe -vm "\Program Files\Java\jdk1.8.0_05\jre\bin\javaw.exe"Jedlicka
So should the path be to javaw.exe? Should -version be replaced with your desired version? Like -x86?Rachellerachis
Either java.exe or javaw.exe should work - we are just trying to find out what version of Java is in that folder. Use the -version flag, don't replace it with anything - this tells Java to report its version rather than actually running anything.Morentz
hi, mine is Program Files <x86>\Java\jdk1.8.0_45\bin but I don't know what to do from here... i tried many things but none worked...Hagiocracy
Using eclipse.exe -vm "C:\Program Files\Java\jdk1.8.0_25\bin" in Windows 7 64 bit works like a charmMonad
so how do we get Eclipse to use the proper Java executable / version?Countrywide
The answer shows how to find out the installed Java version. What is missing is what Java version is required!Nicolettenicoli
@Morentz Im having the same problem. I checked my control panel and saw only 64-bit java versions installed, but command prompt says im running the 32-bit version, and if I go to Control Panel > Programs a tile appears that says Java 32-bit, yet I have no 32-bit java on my computer. what should I do?Wessel
@Nicolettenicoli the bit required depends on the eclipse bit downloaded.Wessel
So I can't use Eclipse to develop 32bit java programs or what? I mean, in netbeans I targeted both 32bit and 64bit with no problems.Augmentation
Java code produced by Eclipse will (in general) run on any platform that supports Java: 32bit or 64bit Windows, Linux or whatever. This question is about getting compatible versions of Eclipse and Java so that Eclipse works.Morentz
When I had the same problem, I resolved it by editing eclipse.ini and changing Dosgi.requiredJavaVersion=1.7 to Dosgi.requiredJavaVersion=1.8Palatal
Your answer helped a lot! I think that you should specify in your answer how to find the second javaw.exe Personally I didn't straightly understand that I should look inside the other program files binary and copy that address. (and not from Program files x86) Finally I understood from what you said "Program Files (x86) is the folder where 64-bit Windows places 32-bit programs." that there is probably jaraws.exe in a different Program Files. Again this helped me a lot!Ictus
I think is the first of the multiple problems that anyone just beginning with eclipse has to deal with...Essayistic
@DNA, What does "13" stand for?Bartz
@Bartz I've not been able to find where the exact meaning is documented, unfortunately.Morentz
I moved the path to the 64bit version of Java to the top of the list and the 32bit version to the end. Now Eclipse starts like a champion.Maricruzmaridel
B
258

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.

If it's doesn't work for you, you'll need to upgrade your JDK (to the Java versions - 8 in this case).

Instructions on how to edit PATH variable

Bow answered 3/11, 2014 at 7:20 Comment(9)
I just found this problem and noticed this same path prepended to my PATH env variable. I just installed VirtualBox yesterday, so I assume that is the culprit.Goober
I had the same problem and tried different options but only solved it after removing entry "C:\ProgramData\Oracle\Java\javapath" from PATH variable. Good catch!Jennee
Great Catch !!! Guys check your Env.PATH Variable and remove this C:\ProgramData\Oracle\Java\javapath;...It is added after JRE8 update I guess.Judaica
so.. not only did oracle delete my java7 path var, but it uses "ProgramData" now? wtf?Anschauung
Came across this javapath thing as well. In addition to removing it, I had to add a PATH variable to my current JDK (1.7.0_09) as well. Seems like the installations of different versions of JDK/JRE set env variables differently.Jerk
Why would you delete the entry when you can just point it to the correct directory instead?Statute
I, too, was facing this error on windows. Removed Java PATH entry in system variables made by Oracle's virtual box. Eclipse started normally then.Suzetta
I just wanted to mention that this happened to me after installing the IntelliJ IDEA IDE. Removing that line from the Path environment variable fixed Eclipse, and as far as I can tell, IDEA is still working as well.Unfreeze
It really works!!! but why java 8 installations messing with env variables.Undernourished
T
227

There are working combinations of OS, JDK and Eclipse bitness. In my case, I was using a 64-bit JDK with a 32-bit Eclipse on a 64-bit OS. After downgrading the JDK to 32-bit, Eclipse started working.

Use one 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, 64-bit Eclipse (64-bit only)
Telluride answered 3/1, 2017 at 10:54 Comment(1)
Note that it is ok to have both 32-bit and 64-bit jre installed.Kleiman
U
183

If you have recently installed Java 8 and uninstalled Java 7, install JDK 8 and retry.

Ulceration answered 30/10, 2014 at 14:6 Comment(5)
This worked for me. I installed Java 8 (I had J7) but I forgot to install the JDK8. So I did it, and "voilà". Thanks!Fechter
This worked for me after a Java 8 install, even though I never uninstalled any other versions of java.Naphtha
Mansour - With Java 8, Oracle bundled the uninstall of prior versions with the install. If you selected that option on install, uninstalling may leave you with nothing.Alongshore
I refuse to install a SDK when I actually only need a runtime.Corpulence
Just to be clear, exit code=13 is always caused by bit-ness mistmatch between Eclipse and the JVM. People can arrive at that point a variety of ways, but in the end it isn't caused by a specific version of Java (6 vs. 7 vs. 8) or whether you use JRE vs. JDK - it's always rooted in a bit-ness mismatch. See the accepted answer above.Oke
K
128

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!

Katzman answered 3/12, 2014 at 7:3 Comment(6)
Worked on Windows seven too, it seems that the installation of Java 8 is messing up with environment variables.Latonialatoniah
This worked for me (Win7 x64). I suspect this entry was added after installing a 32bit jre 8 for Firefox.Carlyn
Thanks man! I have OS(win7 x64) and this solution prompted eclipse to start!Curtiscurtiss
Perfect worked like a charm :) worked for me in windows 8 64 bitFile
I've done quite the same, I juste put 'C:\ProgramData\Oracle\Java\javapath;' at the end (last entry) of my 'Path' so eclipse find the "right" JVM before the "wrong" one.Ppi
Anyone know why this works ? It worked for me also.Acculturize
E
66

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.

Exaction answered 23/1, 2013 at 9:22 Comment(8)
I had updated java, so the java update changed the env. variable value, fixed env. var. value, so it started working.Katinka
Thanks Mohit, I too had updated java of firefox and path variable got updated as C:\ProgramData\Oracle\Java\javapath; .Hence ,eclipse wasn't getting initialised. Thanks again.Calan
Thanks Katusepi... It worked like a charm in my case... But i wonder how do the environment variable change with out my(administrator) permission in windows.. !!!Pomcroy
same problem with path not going to the right placeBorg
Thanks, this saved me a lot of time. On my side I had to install the 64bit jdk and the change the environment variable that the updates had changed.Nag
Thanks had the same problem where my Path was set to C:\ProgramData\Oracle\Java\javapath and I had moved it to the end.Butadiene
@Pomcroy => How exactly you modified eclipse.ini file? I also do not have admin permission and need to solve this same problem. When I added "-vm c:\My_JDK_1.6_Dir\bin\javaw.exe", it still gave me same error - exit code 13 and I see that in the full error log, it shows me two lines "-vm c:\My_JDK_1.6_Dir\bin\javaw.exe" and "-vm c:\ProgramData\Oracle\Java\javapath\javaw.exe". I want to make sure that it starts my JRE/JDK 1.6 and not the one from PATH which is pointing to 1.8Rhomboid
I have not been updated the eclipse.ini just added jdk bin folder in PATH and its working for me.Emlen
K
26

enter image description here

The issue was fixed by doing the following steps.

  1. Eclipse finds the JAVA executables from 'C:\ProgramData\Oracle\Java\javapath'

  2. The folder structure will contain shortcuts to the below executables,
    i. java.exe
    ii. javaw.exe
    iii. javaws.exe

  3. For me the executable paths were pointing to my Program Files(x86) (home for 32 bit applications) folder location

  4. I corrected it to Program Files (which homes 64-bit applications) and the issue got resolved

Please find the screenshot for the same.

Kloster answered 13/12, 2014 at 18:20 Comment(5)
That means it was a 32bit vs 64bit issue as mentioned in top answer. :) Cheers thoughOrganist
These files mentioned were created or changed on my PC with the last update from Oracle - to make it not work! That is really not like it should be ... The 32 bit update just silently removed the 64 bit installationSpevek
How do I change it to program files 64 bit ? I right click java.exe > properties > shortcut tab. The target field cannot be changed.Lipkin
You just remove the 32 bit files and copy the same from 64 bit path(inside Program files)Kloster
You just remove the 32 bit files and copy the same from 64 bit path(inside Program files\Common Files\Oracle\Java\javapath)Kloster
P
26

Adding vm argument to .ini file worked for me

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

Adding more details to this

for sts 3.9.18 release I was getting error Java was started but returned exit code=13 and for latest release same issue just the returned exit code was 14. This was due to default java chosed was of 32 bit and this version of sts/eclipes is for 64 bits. resolved this by setting 64 bits version of java in STS.ini file as -vm C:\Progra~1\Java\jdk1.8.0_131\bin\javaw.exe This is before vmargs parameters in the file.

Promethium answered 16/3, 2015 at 13:52 Comment(1)
My case was Tomcat server (within eclipse) did not get stopped properly from the earlier run. So, I had to kill eclipse from Windows Task Manager. Thereafter eclipse was not starting any more. When I added this solution, it started working again. Seems strange, but this was indeed the fix.Boutonniere
G
23

The strangest fix ever. Look at your Eclipse path, and make sure you do not have strange characters (like !, #, and @). It worked for me.

Galitea answered 4/12, 2012 at 10:50 Comment(1)
Is there an open issue for this?Volition
B
13

Locate eclipse.ini:

Often at C:\Users\xxx\eclipse\jee-neon\eclipse, add

-vm
 C:\Program Files (x86)\Java\jre7\bin\javaw.exe

after

--launcher.appendVmargs
Brittenybrittingham answered 25/10, 2016 at 1:31 Comment(1)
One important note that caught me out, is to have the path on a separate line to -vm, as noted in the documentationCingulum
N
11

I uninstalled Java update 25, and the issue was solved.

Netti answered 21/10, 2014 at 6:22 Comment(2)
That is because probably, you are using jdk 1.7, and browser plugin have installed java 8 update 25, for videos. If you upgrade your jdk to 1.8, in that case this error will go away. Either upgrade the jdk, or uninstall the plug-in. Strange solution.Golden
I updated my java version because a browser plugin needed the update. It did not work anyways and I ended up not having Eclipse fully functional. That sucked!Hodge
C
11

A clean reinstall of the Java JDK did the trick in my case. I am running Eclipse 4.4 (Luna) like a charm now.

Cernuous answered 13/2, 2015 at 12:46 Comment(0)
Y
11

You have to go to the folder where eclipse is installed and then you have to change the eclipse.ini file.

You have to add

-vm

C:\Program Files\Java\jdk1.8.0_202\bin\javaw.exe

Your eclipse.ini file will look like the below screenshot

enter image description here

Yoshieyoshiko answered 5/4, 2019 at 10:27 Comment(1)
Please refer https://mcmap.net/q/53147/-can-39-t-start-eclipse-java-was-started-but-returned-exit-code-13 for additional details about this solution.Naman
Q
10

The solution is simple: Put the "eclipse" folder on "C:/Program Files". If it does not work, put it in "C:/Program Files (x86)".

Quinine answered 25/10, 2012 at 1:44 Comment(3)
This solution as well as removing full path and only using, "Javaw.exe" worked for me.Amelia
Beware of this solution if you are working on a managed windows instance. Most IT/Sec domains have the Program Files directory tree locked down for write access which fubars eclipse.Lukin
I was experiencing the same issue with Lua Development Tools and this solution worked for me!Headon
C
10

It turned out I only had the 32-bit Java runtime installed.

C:\Program Files (x86)\Java\jre1.8.0_45\

All Eclipse really wanted was for me to install the 64-bit Java runtime. <= SOLVED

Java SE Runtime Environment 8u45  jdk-8u45-windows-x64.exe

http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Confirm your installation by checking you now have this folder

    C:\Program Files\Java\jre1.8.0_45\
Chara answered 22/6, 2015 at 2:51 Comment(1)
maybe you meant "jre-8u45-windows-x64.exe" instead of "jdk-8u45-windows-x64.exe"Taffy
F
9

The best answer here is too long. I cannot comment so I added my answer.

  1. Go here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. Download the latest SDK (of course for x64 if your computer is x64)
  3. Install it
  4. Now the party is finished, and it's time to work with Eclipse ;)
Fortson answered 10/2, 2015 at 9:13 Comment(0)
C
9

I had this message when I had forgot to install the JDK.

Counterscarp answered 21/2, 2015 at 13:49 Comment(3)
How can eclipse say java was started then if its not on your machine?Jeuz
It works for me :) After normal update to 1.8 i havent install JDK manualy. Now everything works fine.Abruption
@AmitKumar Probably picket up a default browser Java installation.Variscite
S
7

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
Scabbard answered 7/8, 2014 at 5:37 Comment(3)
I'm 64bit. When I installed jdk1.8.0_20 for 64 bits, it requested me to reboot. I did. It left a JRE in Program Files (x86) and just a DLL in the 64bit Program Files (no javaw.exe), so I pointed the -vm to the Program Files (x86). I still got code=13. With this ashout.com/fix-java-started-returned-exit-code13-eclipse I realized bit versions "should" match yes or yes. So I run the very same JDK installer for a second time. Surprisingly it deployed new files that were missing the first time. Now it works with -vm in C:\Program Files\Java\jdk1.8.0_20\bin\javaw.exe.Fanion
Is that really two lines in file eclipse.ini?Latterll
@PeterMortensen yes, did yu tryScabbard
A
6

Make sure you don't have special characters (%, $, #, etc.) at Eclipse path.

Arris answered 27/5, 2013 at 10:15 Comment(2)
This was it for me! I had my eclipse folder on the desktop and the active user had a special character in their user name.Stylo
This is already covered by bello's answer, posted about 1/2 year prior.Latterll
M
6

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.

Mahmoud answered 23/10, 2014 at 8:49 Comment(1)
My case indeed. The mismatch between 32 and 64 bits is classic. I didn't even remember whether or not I downloaded a 64 bits version until I use java -versionEpigynous
B
6
  1. Under system environment variables, make sure "C:\ProgramData\Oracle\Java\javapath" is removed.

  2. Under system environment variables, make sure "C:\Program Files\Java\jdk1.8.0_131\bin" is added.

enter image description here

Barnebas answered 4/11, 2017 at 8:21 Comment(0)
S
5

I tried some of the solutions, but not worked for me.

Finally, I found another way, ...

Go to Environment VariablesSystem 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...

Sabbatical answered 24/11, 2014 at 6:35 Comment(1)
I did all other solutions, but they didn't work for my windows 10. Anyway, your solution worked for me and saved my many hours.... SALUTE !!!. Thanks so much.Balkhash
G
5

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.

Glowworm answered 18/12, 2014 at 10:17 Comment(0)
D
5

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.

Devaughn answered 6/1, 2015 at 22:58 Comment(0)
W
5

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
Whopping answered 13/3, 2015 at 7:35 Comment(0)
A
4

It could be due to too little 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?

Anemic answered 12/7, 2012 at 22:38 Comment(0)
H
4

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.

Habile answered 6/11, 2014 at 16:28 Comment(0)
N
4

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.

Nonprofit answered 23/1, 2015 at 13:59 Comment(0)
F
4

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.

Friedcake answered 8/2, 2015 at 17:10 Comment(0)
O
4

Please check whether you have set two JAVA paths in the Environment Variable section. If you already installed two versions of the JDK, it might be, then double check you have put PATH for Java like below.

PATH -->  C:\ProgramData\Oracle\Java\javapath

and also

JAVA_HOME ---> C:\Program Files\Java\jdk1.7.0_02\bin

If both are there, then this sort of error may occur.

If it's OK, then check in the ".ini" file the below area is OK or not. Open ".ini" file and check

 -VM  path is  C:\Program Files\Java\jdk1.7.0_79\bin\

If not, please set it like that and run again.

Ocean answered 26/9, 2016 at 8:55 Comment(1)
Note that the jdk path did not work for me, it had to be the jreRabbit
H
4

In "Path" variable removed "C:\ProgramData\Oracle\Java\javapath" and replaced it with "C:\Program Files\Java\jdk1.8.0_212\bin"

It worked for me.

Hypoblast answered 4/2, 2020 at 11:50 Comment(0)
C
3

This type of errors occur basically due to use of different versions of Java with different version of Eclipse.

Suppose you are installing the 64-bit JDK on your system. Then make sure you install the 64-bit versioned Eclipse with it.

And if you are installing the 32-bit JDK on your system then make sure you install 32-bit versioned Eclipse with it.

I had the similar problem. I have installed the 32-bit JDK and was trying to use 64-bit Eclipse.

But when I installed the 64-bit JDK on my system then Eclipse started working without any problem.

It is advised to better install the 32-bit version of Java along with the 32-bit version Eclipse on a system with a 32-bit configuration and similarly for 64-bit systems.

This helps to increase performance of the system.

Colemancolemanite answered 26/7, 2015 at 19:48 Comment(0)
L
2

This might happen if you have several versions of Java on the same machine. To fix this I did the following:

  1. Checked the current JAVA_HOME value. In Windows, echo %JAVA_HOME%
  2. Accessed the route of javaw.exe
  3. Replaced the shortcuts pointing to the Java home location.
Lustring answered 21/10, 2014 at 16:1 Comment(0)
T
2

I had an x64 bit JDK. There was nothing in my path settings. So I installed the x86 JDK. This solved my problem perfectly.

Tuba answered 15/12, 2014 at 18:30 Comment(0)
T
2

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.

Tolentino answered 26/12, 2014 at 9:3 Comment(0)
P
2

At the risk of not adding a great deal of value to the existing answers, but having gone through all this mess myself, I would like to see if I can consolidate how I addressed the problem:

  1. Maintain separate Development from your normal machine environments. The reason for this is that there are probably many applications running on your machine that you are not aware of that need Java to be updated occasionally, for example banking and security applications. When those updates occur they change the environmental variables and so if you are using those in your development environment the update will almost certainly break your Eclipse setup.

  2. Install versions of Eclipse, either 32 and 64 bit depending on your plugins etc. The reason is that many plugins still require 32bit and trying to install them into a 64bit environment causes many obscure (very obscure) errors. This means for example you may have to have separate instances of Eclipse for your Java EE, PHP, Python, Assembler, etc, development environments. This may appear to be onerous, but for me this has been a blessing.

  3. Install two Java runtimes once again one 32bit and one 64bit and then edit the eclipse.ini for each of your installations to point to the correct JRE, not the JRE HOME in the environmental variables. I create a directory in C:\Java\64bit\jdk1.7.0_15\ and C:\Java\32bit\etc and in your eclipse.ini file you add the -vm C:\Java\64bit\jdk1.7.0_15\bin line to point to your needed java runtime.

Once the above is done you can install Java SDKs updates as much as you like but your development environment will never break. If you need to update your development runtime environment just alter the -vm path in your eclipse.ini

Pasticcio answered 27/12, 2017 at 2:39 Comment(0)
A
2

In case your machine has multiple Java versions installed, you can simply tell eclipse which and from where to use javaw.exe.

In my case I have IBM JDK, with oracle JDK too, but for eclipse to pickup, Added below lines in eclipse.ini file in eclipse directory and it worked.

-vm
C:/WAS9DEV/java/8.0/bin/javaw.exe

Path to your java folder has to be replaced in above example

Hope it helps.

Audacity answered 24/8, 2019 at 18:12 Comment(0)
T
1

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://mcmap.net/q/54273/-how-to-find-out-if-an-installed-eclipse-is-32-or-64-bit-version

Twosome answered 27/10, 2014 at 15:53 Comment(0)
R
1

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.

Raffin answered 18/11, 2014 at 14:38 Comment(0)
N
1

I've solved this issue by installing a JDK (v7 update 80) whereas I had only had the JRE installed before.

Note: This was for IBM's RTC software (built on Eclipse).

Nl answered 21/1, 2016 at 22:11 Comment(0)
M
1

The top answer didn't work for me: I had no environment variables defining the Java path or no Java in my path.

However, the path C:\ProgramData\Oracle\Java\javapath\javaw.exe was always present in the Eclipse 4.5 (Mars) error popup in the -vm option even if I tried to override in file eclipse.ini.

I worked around this by opening a command prompt, cd'ing the directory where the eclipse.exe was and using MKLink:

C:\EclipseMars> mklink javaw.exe "C:\Program Files\Java\jdk1.7.0_79\bin"
symbolic link created for javaw.exe <<===>> C:\Program Files\Java\jdk1.7.0_79\bin

No changes to eclipse.ini were required.

I did try to specify the -vm option of in eclipse.ini, and it was taken into account, but in the error popup a -vm option was present twice even if only one -vm was present in eclipse.ini.

In my eclipse.ini I have no -vm option and just the symlink seems to have corrected it.

Marchelle answered 27/5, 2016 at 7:51 Comment(1)
Didn't work for me and I ended up getting a "JVM terminated. Exit code=2". Turns out I needed to install the jre for 64-bit, which matched the 32-bit previously installed during a recent update.Bamberg
N
0

In my case, I have two different JDK that is IBM and Oracle JDK. I moved IBM JDK to the top of the Oracle JDK in environment variable then it worked. Note: I am going to use IBM JDK so I moved up.

Northwards answered 30/9, 2019 at 10:29 Comment(0)
K
0

it could be JDK combinations issue or JDK version issue select proper one. i am using combination of 64-bit Operating System, 64-bit JDK, 64-bit Eclipse IDE.

Kuhlman answered 14/5, 2020 at 20:55 Comment(0)
B
-1

I had the same issue... installed STS but consistently got the "java was started but returned exit code=13" message. My issue was that I was using the default install file, which was not processor specific, from https://spring.io/tools/sts. I had to dive deeper to be very specific in downloading the 64 bit version. It was not intuitive as to which version you were downloading. Once I got the 64 bit version (note that the zip file still includes 'win32' in the name, just appends '-64' at end) it worked.

Boughpot answered 27/2, 2018 at 3:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.