I just append -vm C:\Program Files\Java\jre6\bin\javaw.exe
in eclipse.ini then I try to start eclipse again and got this error. Give me how to solve or link that actually solve it.
this is my eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize 256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
-vmargs
-Xms40m
-Xmx384m
Thank you
In my opinion the most answers here regarding different architectures of Eclipse and Java are simply wrong and this can be easily checked using e.g. Process Monitor under Windows. The
-vm
option is there to run a specific version of java and the point of it is, that the configured process is started and runs all the Java code on its own, that's why you configure up tojava.exe
. In that case you DON'T need to have the same architecture for Eclipse and Java, but can happily mix both 32 Bit and 64 Bit. You only CAN'T mix both, if you DON'T use-vm
, but let Eclipse load Java natively into its own process using jvm.dll and such. That latter behavior is Eclipse's default, but not the case anymore if you properly configure-vm
ineclipse.ini
.If you don't believe me, do some tests on your own using different architectures of Eclipse and Java and do configure
-vm
or not properly. In the end, that's exactly what the questioner described in his comment to the accepted answer:Cannot run Eclipse; JVM terminated. Exit code=13
He is telling that a 64 Bit JDK is working now, but in his screenshot one can see that his Eclipse is 32 Bit, because the path for
launcher.library
is 32 Bit.And now for the reason I came here: Ony of my customers had some problems loading one of our Eclipse/OSGI based applications as well and Java exited with exit code 13. In the end it showed that the problem was not about
-vm
or the architectures of Java andeclipse.exe
, but instead he was simply missingconfig.ini
and I guesseclipse.exe
wasn't aware what to load or such. After we recognized that and put aconfig.ini
back in place, the app loaded fine with using-vm
and a 64 Bit JRE7 in combination with a 32 Biteclipse.exe
.The error means it's the wrong JVM version for that version of Eclipse. The link has more details:
http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
Before going to the solution, let us know why it is showing that error. If you know the problem behind this issue we can easily fix that error.
Reason 1: The most common reason behind this problem is, we are trying to install different bit version-that is, 64 bit or 32 bit version of the software. It maybe either Eclipse or Java.
Solution: Check which version of operating system you are running.make sure you downloaded the same version of Eclipse as well as same version of Java software.
Reason 2: Configuration mistake in Eclipse.ini file
Solution: Add this line "-vm then path of your java sdk" at the end of Eclipse.ini file. for example: -vm C:\Program Files\Java\jdk1.7.0_71\bin\javaw.exe
Reason 3: Special characters ( #, !, @) in Eclipse installation directory.
Solution: Make sure you don’t have any special characters.
Reason 4: You have added JAVA path two times in PATH system variable and both the path are different.
Solution: Remove one incorrect/different JAVA path from PATH system variable.
Reason 5: You maybe using latest version of Eclipse, but you might be using wrong version or unsupported version of Java Virtual Machine (JVM).
Solution: To check which version of java you are using open command prompt by pressing win+R key and type cmd and press enter. Now in that console type Java -version command to know java version. Now research whether eclipse support that version or not. Or You can open “readme” folder in Eclipse folder and open readme_eclipse.html to see which version it supports.
You need to check if your PC has a 64-bit or 32-bit operating system, then same goes for your JDK (64-bit/32-bit) and also for Eclipse (64-bit/32-bit).
Make sure they are all the same; if not, you need to download the one that matches your bitness.
I just hit this too. Turns out that at least for me, this was due to trying to use a win64 version of the JRE with a win32 Eclipse. I seems that win32 Eclipse requires a win32 Java (what is called -586 in the list of Java installers from Oracle/Sun).
The reason I was using both is that I was trying to pinpoint a bug that only manifested itself in 64-bit Eclipse, so I needed a 32-bit to compare to.
Once I installed BOTH the "x64" (win64) and "i586" (win32) versions of the JRE on my machine, things work fine and no error 13. You can apparently have both installed at the same time.
In my case JAVA path was not set in Env variables. Started to work after correct path was set in Env PATH.
Type javac in command prompt and make sure JAVA PATH is correct.