После некоторых манипуляций с установленными JVM, при запуске Eclipse, появляется окно с ошибкой , текст которой начинается с «Java was Started but Returned Exit Code=13». Решения проблемы нашёл в заметке http://www.ashout.com/fix-java-started-returned-exit-code13-eclipse/ большое спасибо автору. У себя оставлю перевод.
Если вы получили ошибку “Java was Started but Returned Exit Code=13” во время установки Eclipse, то здесь вы поймете как решить её. Даже я столкнулся с этой проблемой в процессе установки Eclipse на операционной системе Windows. После поиска в Google я понял что многие сталкиваются с аналогичной проблемой в Eclipse. Если вы один из них, то здесь есть решение этой ошибки.
Причина ошибки “Java was Started but Returned Exit Code=13”
Прежде чем приступить к решению, давай те узнаем почему возникает эта ошибка. Если вы знаете почему возникает проблема, вы можете легко её решить.
Причина 1: Основная причина возникновения проблемы это установка разных версий 64 bit или 32 bit программного обеспечения. Это может быть Eclipse или Java.
Причина 2: Ошибка конфигурации в файле Eclipse.ini.
Причина 3: Специальные символы (#, !, @) в директории установки Eclipse.
Причина 4: Вы можете использовать последнюю версию Eclipse, но неправильную или не поддерживаемую версию Java Virtual Machine (JVM).
Выше описаны основные причины возникновения ошибки «Exit code =13» в Eclipse. Теперь мы узнаем как её решить.
Как решить «Java was Started but Returned Exit Code=13 Error» в Eclipse
Решение для причины 1: Проверьте версию операционной системы в которой вы работаете. Для проверки откройте окно «Компьютер» нажав клавиши Win+E или найдя его на рабочем столе или в кнопке пуск.
Теперь в левой панели найдите «Мой компьютер» выделите его и нажмите правой кнопкой мыши. В выпадающем меню выберите «Свойства». Когда вы нажмете на «Свойства», вы увидите окно системных свойств. В этом окне посмотрите свойство «Тип системы».
В «Тип системы» вы увидите какая у вас система 64-х разрядная или 32-х разрядная. То что вам и нужно было узнать.
Теперь вы знаете в какой операционной системе вы работаете.
После того как вы узнали какая операционная система, вы должны убедиться что скачали соответствующую версию Eclipse, а также Java.
Если вы закачали 32-х разрадную версию Java или Eclipse (на 64-х разрядной системе), вы получите ошибку «Exit code=13 error».
Пожалуйста дважды проверьте версию того, что вы закачали. Потому что во время установки не появится какая-либо ошибка несоответствия версии. Установка пройдёт гладко.
В моём случае я скачал 32-х разрядную версию Java и получил эту ошибку.
Решение для причины 2: Возможно вы сделали ошибочную конфигурацию файла Eclipse.ini, который можно найти в каталоге Eclipse. Вы можете посмотреть это официальное руководство если нужно.
Отметим несколько важных правил для настройки -VM опций.
- -VM опция и его значение ней (путь) должны быть на разных строках
- Значение должно указывать полный абсолютный или относительный путь к выполняемым файлам Java(к каталогу bin), не к домашней директории Java.
- -VM Опция должна быть до -VMARGS, так как все значения после -VMARGS передаются непосредственно в JVM.
Вы может использовать этот снимок с экрана для моей рабочей конфигурации Eclipse.ini.
Решение для причины 3: У вас могут использоваться специальные символы #, !, @ в установочном каталоге Eclipse. Если ваш каталог с установленной Eclipse содержит специальные символы, тогда появится эта ошибка. Поэтому убедитесь что вы не используете специальные символы.
Пример
До исправления специальных симврлов
C:# IDEeclipse 3.7
После исправления специальных символов в адресе
C:IDEeclipse 3.7
и решения проблемы.
Решение для причины 4: Может быть вы используете последнюю версию Eclipse и не поддерживаемую версию Java.
Для проверки версии Java нужно открыть командную строку нажав win+R и введя cmd и нажмите Enter. Теперь в консоле введите java -version, что бы узнать версию Java.
Теперь определите поддерживает ли Eclipse данную версию или нет.
Вы можете открыть каталог “readme” в каталоге Eclipse и открыть readme_eclipse.html что бы посмотреть какие версии поддерживаются.
Я рекомендую вам скачать последнюю версию Java и Eclipse.
Надеюсь вы решили проблему «Java was Started but Returned Exit Code=13 Error» в Eclipse после этой заметки. Дайте знать почему у вас возникла эта ошибка в комментариях.
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)Javajre7binjavaw.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.
If you are getting an error saying “Java was Started but Returned Exit Code=13” during Eclipse installation, then there is a fix for that. Even I faced this problem during eclipse installation on my windows operating system. After searching on google, I found that many of the users facing a similar issue with Eclipse. If you are one of them, then here is the solution for the error.
Reasons for Java was Started but Returned Exit Code=13 Error:
Before going to the solution, let us know why it is showing that error. If you know the problem with 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 may be either Eclipse or Java.
Reason 2: Configuration mistake in Eclipse.ini file
Reason 3: Special characters ( #, !, @) in Eclipse installation directory
Reason 4: You may be using latest version of Eclipse, but you might be using wrong version or unsupported version of Java Virtual Machine (JVM)
Reason 5: Issue with your Environment Path Variable
The above are the main reasons causing that Exit code =13 in eclipse. Now let us know how to fix that error.
How to Fix – Java was Started but Returned Exit Code=13 Error in Eclipse
The Solution for Reason 1:
Check which version of operating system you are running. To check that, open windows explorer by pressing a Win+E key on your keyboard.
Now on This PC (My Computer) which you found on the left side, Select that and right click on the mouse. In that pop-up menu choose Properties option. When you click that properties option you will see system properties window. In that window have a look on “System Type” option.
In that System type, you will see 64-bit Operating System. That’s what we need to know.
Now we know which version of the operating system we are running.
After knowing operating system version, make sure you downloaded the 64-bit version of Eclipse as well as a 64-bit version of Java software.
If you downloaded 32-bit version (X86) of Java or eclipse any one of them, you will get that Exit code=13 error.
Please double check the versions which you have downloaded. Because during installation it won’t show any error regarding the incompatible version. It will install smoothly.
In my case, I have installed the 32-bit version of Java so I’m getting that error.
The solution for Reason 2:
Maybe you might have made a mistake in configuring Eclipse.ini file, which can be found on Eclipse directory itself. You can check this official guide if needed.
Here the few important rules to be noted while specifying -VM option
- The -vm option and its value (the path) must be on separate lines.
- The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
- The -vm option must occur before the -vmargs option since everything after -vmargs is passed directly to the JVM.
You can check the below screenshot of my working Eclipse.ini configuration.
The solution for Reason 3:
You have might have special characters like #, !, @ in eclipse installation directory. That is, if your eclipse installation address contains any special characters, then it shows that error. So make sure you don’t have any special characters.
Example:
Before fixing special character
C:# IDEeclipse 3.7
Have you noticed that “#” character?
After fixing that special character in address
C:IDEeclipse 3.7
and that solved the problem.
Reason 4 Solution:
Maybe you are using latest eclipse version and unsupported Java version.
To check which version of Java you are using open command prompt by pressing a 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 supports that version or not.
(or)
You can open “readme” folder in Eclipse folder and open readme_eclipse.html to see which version it supports.
(or)
I recommend you to download both Java and eclipse the latest version.
Reason 5 Solution:
For some user after removing some system variable entry on “Environment Variable” it started working.
To do that.
Search for “System Variable” and Select “Edit the System Environment Variable” option.
After that, choose “Advanced” tab >> Environment Variables.. >> Select “Path” >> click “Edit” and then remove the first entry. That is, “C:ProgramDataOracleJavajavapath;”
Click on the image to enlarge
Hope you have fixed Java was Started but Returned Exit Code=13 Error in Eclipse by following this post. Let us know which reason causing you that error by the comment.
SUBSCRIBE TO OUR NEWSLETTER
Join our newsletter for tech tips, reviews, guides, and exclusive deals!
A Quick Guide to solve Java was started but returned exit code 13 in Eclipse and java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM with 4 correct solutions.
1. Overview
In this tutorial, we»ll learn about the error while starting eclipse «Java was started but returned exit code=13″ that can not start Eclipse and it’s solutions.
Another similar error «java started but returned exit code 1» and same error can be seen with oxygen or neon «java started but returned exit code 13 eclipse neon«
These are the common errors that we see frequently in our development process. Please see the following errors while starting up the eclipse after double click eclipse.exe file in eclipse location.
Read more on «Troubleshooting» article.
We might be experiencing these errors after updating the java version or running OS or JAVA irrelevant eclipse versions.
1.1 Eclipse Error
We need to know about the following to solve these eclipse start up errors. All these are discussed in the further of this post.
1) Java version installed with os bit
2) Eclipse bit version
3) What is the problem coming while starting eclipse.
2. How to check java version installed
To check the java version that you are currently using, Open command prompt (cmd) using «windows + r» then then type «cmd» then command prompt appears in a new window as following.
java -version
output:
D:blogger>java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) Client VM (build 25.131-b11, mixed mode)
3. OS and Eclipse Bit Verification
We must know on which bit os is running on windows whether it is 32 bit or 64 bit and the same for eclipse whether 32 bit or 64 bit eclipse.
3.1 To know which Java bit is installed on Windows 64 bit OS
First way to check, Just see that where your java is installed in your C drive. Following are folder names. Check which directory your java installed.
Program Files (x86): This is the folder where
64-bit Windows places 32-bit programs.
Program Files: This is the folder where 64-bit Windows places
64-bit programs.
So, If your java is in folder «Program Files (x86)» then java is 32 bit or If your java is in «Program Files» then it is java is 64 bit.
3.2 Finding the eclipse version of bitness (32 bit or 64 bit)
Second way to check the eclipse version in the location D:/eclipse/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807.
If you see the file name like this having «win32.x86_64» then downloaded eclipse is 64 bit or file name has «win32.x86_1.1» then eclipse is 32 bit.
3.3 eclipse.ini
Last way is Open the file eclipse.ini at eclipse root location.
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.500.v20170531-1133 --> 32 bit. plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807 --> 64 bit
4. Possible errors
If there is any compatibility issues between java and eclipse then the following errors are supposed to be happen.
Java was started but returned exit code=13 — Can’t start Eclipse is commonly faced by most of the developers.
4.1 Error 1
!SESSION 2017-08-06 18:47:46.019 ----------------------------------------------- eclipse.buildId=M20130204-1200 java.version=1.8.0_131 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_IN Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product !ENTRY org.eclipse.osgi 4 0 2017-08-06 18:47:53.020 !MESSAGE Application error !STACK 1 java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM at org.eclipse.swt.internal.Library.loadLibrary(Library.java:260) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240) at org.eclipse.swt.internal.C.(C.java:21) at org.eclipse.swt.widgets.Display.(Display.java:138) at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:653) at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161) at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
4.2 Error 2
java was started but returned exit code=13 C:Program Files (x86)Javajre7binjavaw.exe -Xms40m -Xmx512m -XX:MaxPermSize=256m -jar C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipse\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar -os win32 -ws win32 -arch x86_64 -showsplash C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipse\pluginsorg.eclipse.platform_4.2.0.v201206081400splash.bmp -launcher C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipseeclipse.exe -name Eclipse --launcher.library C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipse\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v201205221813eclipse_1503.dll -startup C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipse\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar --launcher.overrideVmargs -exitdata 1e30_5c -vm C:Program Files (x86)Javajre7binjavaw.exe -vmargs -Xms40m -Xmx512m -XX:MaxPermSize=256m -jar C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipse\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar
5. Fix to Java was started but returned exit code=13
How to fix the errors:
The following solutions work for both errors.
5.1 Solution 1
Working combinations of OS, JDK and eclipse bitness (32 bit or 64 bit). In your case, if you were using 64-bit JDK with 32-bit eclipse in a 64-bit OS, after downgrading JDK to 32-bit then eclipse will start working.
It’s good to 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 , 64bit Eclipse (64-bit only)
This solution should work but it is tricky. You should know the versions as described above.
5.2 Solution 2
If java is configured wrongly in Eclipse.ini file in the eclipse directory.
Eclipse.ini file must have a valid absolute java location. If you have installed many java version, select right version that compatible to the current eclipse.
-vm C:Program Files (x86)Javajdk1.8.0_201binjavaw.exe
If OS is 32 bit then java and eclipse version also should be 32 bit. Please make sure, you are having all 32 bit version.
If OS is 64 bit then there might be a chance of having two java versions 32 bit and 64 bit.
Check your eclipse version then open file «eclipse.ini» in eclipse root folder and add the following to it.
For 32 bit eclipse --> add "-vm C:Program Files (x86)Javajre1.8.0_131binjavaw.exe" For 64 bit eclipse --> add "-vm C:Program FilesJavajre1.8.0_131binjavaw.exe"
From eclipse.ini file:
After adding -vm arguement.
--launcher.appendVmargs -vm C:Program Files (x86)Javajdk1.8.0_201binjavaw.exe -Dosgi.requiredJavaVersion=1.8 -Dosgi.instance.area.default=@user.home/eclipse-workspace -XX:+UseG1GC
Note: Check the location on your machine where the java installed.
5.3 Solution 3
By default, eclipse refers to the java version which is present in «PATH» variable. If you have non compatible java path is added to «PATH» then above two solutions may not work.
Please add the correct java version location or remove from «PATH«.
Note: Once you are able to launch Eclipse, make sure you verify the installed JRE location under Java —> Installed JREs in the Preferences window.
Download the latest eclipse version from the official link here. (Luna, Mars, Neon, Oxygen)
New eclipse package includes
Data Tools Platform
Git integration for Eclipse
Eclipse Java Development Tools
Eclipse Java EE Developer Tools
JavaScript Development Tools
Maven Integration for Eclipse
Mylyn Task List
Eclipse Plug-in Development Environment
Remote System Explorer
Code Recommenders Tools for Java Developers
Eclipse XML Editors and Tools
6. Conclusion
In this tutorial, We’ve seen what are the common issues that occur when we start eclipse. Most common issues are
1. java was started but returned exit code=13
2. Cannot load 64-bit SWT libraries on 32-bit JVM
Discussed what are the things needs to be checked on the initial steps and provided all possible solutions. This tutorial will provide the accurate solutions for eclipse issues.
If these are not helping, Please post your exact error what your getting in your case. We will provide you the fix.
References:
TheCrazyProgram Fix
JavaHungry Answers
StackOverFlow
Eclipse is the most popular ide in tech industry especially among java developers. Although it is popular, you have to be careful while using it. If Eclipse is not configured properly, many issues will arise. One of the issue linked with Eclipse is «java was started by returned exit code=13» error. This error is mostly faced by java beginners. I faced the same issue while installing the Eclipse in my computer. I found the solution and sharing the 6 different ways to solve «java was started but returned exit code=13» error in eclipse.
Read Also : Java 8 Interview Questions and Answers
1. Configuration Mistake in Eclipse.ini file
You might have made a mistake while configuring Eclipse.ini file. You can find the eclipse.ini in the eclipse installation directory. You can open eclipse.ini using notepad in windows.
You need to add the following code just before the line that includes -vmargs in the eclipse.ini file.
-vm
C:Program FilesJavajdk1.7.0_40-64binjavaw.exe
The second line above i.e (C:Program FilesJavajdk1.7.0_40-64binjavaw.exe) may be different depending upon the java jdk version installed in your computer.If you have a 32 bit java jdk version , it may be found in Program Files(x86).
Important Rules for Specifying -vm option.
a. The -vm option and its value (the path) must be on separate lines.
b. The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
c. The -vm option must occur before the -vmargs option.
For more details you can check this out here.
Below is the screenshot of the working eclipse.ini configuration :
2. Different bit version :
There are two versions of bit version configuration (32bit or 64 bit). If you have installed 64 bit version of java jdk and 32 bit version of eclipse ide or vice versa , then you will get this error.
You will get rid of this error by just downloading the correct version of java jdk and eclipse ide.
How to Check the bit version configuration of Windows machine
a. Open File Explorer by pressing WindowsKey + E
b. Right Click on «This PC» (My Computer).
c. Click on «Properties».
d. It will open another window, check «System Type» (in our case as shown in image, 64 bit Operating system).
Now, we come to know which bit version operating system we are using.
After knowing 64 bit version operating system, I need to install 64 bit version of Java jdk and 64 bit version of eclipse ide.
How to Check if Java is 64 bit or 32 bit
a. Press WindowsKey + R ( run window)
b. Type «cmd»
b. In the command prompt just type below command
it will give below error if java jdk version is 32 bit.
Error: This Java instance does not support a 64-bit JVM.
Please install the desired version.
It will work fine if 64 bit version java jdk is installed. You will see similar message as shown below:
C:>java -d64 -version
java version «1.8.0_181»
Java(TM) SE Runtime Environment (build 1.8.0_181-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b25, mixed mode)
Most important point is to make sure there is no mismatch between the version of java jdk and eclipse ide.
In short you need to follow one of the three scenarios:
a. 32-bit OS , 32-bit JDK, 32-bit Eclipse (32-bit only)
b. 64-bit OS , 32-bit JDK, 32-bit Eclipse
c. 64-bit OS , 64-bit JDK, 64-bit Eclipse (64-bit only)
3. Environment Path Variable issue
By removing Environment Path variable, exit code=13 error may start working for some users.
Step by Step Guide For Finding Path Variable in Windows 10 or 8
a. Search for «System Variable».
b. Select «Edit the system environment variables» option
c. Click on «Advanced» tab
d. Click on «Environment Variables»
e. Select «Path», then click on «Edit»
If you are using another Windows Operating System (7,Vista, xp) or Linux or MacOS then you can find «Path» here .
After finding the «Path» you can follow below steps
Remove the entry i.e «C:ProgramDataOracleJavajavapath;»
Restart the eclipse again.
4. Eclipse Installation Directory contains Special Characters like (#,@,!)
You might have special characters in eclipse installation directory. You have to make sure there is no special characters in the eclipse installation address.
Example :
Before fixing special character(in below case @)
C:@IDEeclipse4.6
By removing the «@» special character from the path it will solve the problem.
C:IDEeclipse4.6
5. Wrong version or Unsupported version of Java Virtual Machine
It may be possible that you are using unsupported java version with the latest eclipse version.Also, there are lot of compatibility issues with java jdk 1.8 and higher versions. So if you are not able to fix the error from the above methods, then try degrading jdk 1.8 to jdk 1.7 or lower version and check if error is fixed or not.
6. If you have installed java 8 and uninstalled java 7. Then try to install Jdk 8 and retry.
Please mention in the comments below if you have fixed «java was started but returned exit code=13» error in eclipse and which method (from 1 to 6 above) has helped you.
References : Ashout and StackOverflow
Some users are getting the Java Was Started but Returned Exit Code=13 Eclipse error when trying to run Eclipse. The issue is reported to occur with Windows 7, Windows 8, Windows 10 (32 and 64 bit).
What is causing the ‘Java was started but returned exit code =12’ error?
We investigated this particular issue by looking at various user reports. Based on what we gathered, there are several fairly common scenarios that are known to trigger this particular error message:
- An incompatible Eclipse or Java version is installed – This is the most common reason why this error message is occurring. It’s likely that likely that you’ve installed a 64-bit version of Eclipse or Java while your computer only supports 32-bit (or vice-versa).
- Eclipse includes special characters in the installation directory – Several users have managed to resolve this error message after removing the special characters (#$%^) from the installation directory.
- The computer is using an unsupported version of JVM (Java Virtual Machine) – Even if you ensure that you’re using the latest version of Eclipse, it’s possible that you’re seeing this error because you’re running an unsupported version of JVM.
- The Java Environment Path Variable is incorrectly set – Some users have managed to resolve the issue after discovering that the issue was caused by an incorrectly set Java Environment PATH variable.
If you’re struggling to resolve this particular error message, this article will provide you with a list of quality troubleshooting steps. Below you have a collection of methods that other users in a similar situation have used to get the issue resolved.
For the best results, follow the methods below in order that they are presented until you encounter a fix that is effective in getting fixing the problem in your particular scenario
Method 1: Using the correct combination of Eclipse – JDK
Eclipse and JDK (Java Development Kit) are very picky when it comes to working with one another. Keep in mind that there are only several working combinations of OS, JDK and Eclipse bitness. If you happen to use an unsupported combination, of Operating System, JDK and Eclipse, you will get the Java Was Started but Returned Exit Code=13 Eclipse error message.
Below we’ve compiled a list of working combinations. Use them for reference to verify whether is issue occurs due to an unsupported combination:
- 32-bit OS, 32-bit JDK, 32-bit Eclipse (32-bit only)
- 64-bit OS, 64-bit JDK, 64-bit Eclipse (64-bit only)
- 64-bit OS, 32-bit JDK, 32-bit Eclipse
If you have a different setup, uninstall the unsupported component and then install an appropriate one until you are able to open Eclipse without encountering the error message.
Note: In the event that you don’t know the bit architecture of your operating system, press Windows key + R to open up a Run dialog box. Then, type “msinfo32” and press Enter to open the System Information screen. In the System Information screen, go to System Summary and check up the System Type from the right pane. That’s where you’ll find your OS architecture.
If this method wasn’t applicable, move down to the next method below.
Method 2: Removing special characters from the Eclipse directory path
You might also be encountering the issue because the installation directory contains special characters. Several users who were in a similar situation have managed to get the issue resolved after eliminating the special characters (@#$%^&*()+) from the directory name.
By default, you should be able to find Eclipse in C:IDEeclipse or in C:Users*YourUsername*eclipse. However, if you installed in a custom location, you might have mistakenly added a special character that is creating the issue.
You can remedy the issue by navigating to the location of the Eclipse installation manually and removing any special character that might end up creating the error message.
Note: Certain users have reported that they started getting a different error after removing the special characters from the Eclipse installation directory. This is most likely occurring because there are other dependencies that were relying on that particular location and they no longer function properly due to the change. In this case, you can resolve the problem entirely by reinstalling Eclipse.
If this method didn’t allow you to resolve the Java Was Started by Returned Exit Code=13 Eclipse error, move down to the next method below.
Method 3: Removing the broken System PATH variable
As it turns out Java 8 and a few other Java updates have the potential to mess up the environment variables, triggering the Java Was Started but Returned Exit Code=13 Eclipse error message.
If you only started to get this error message after installing Java (or a Java update), follow the steps below to remove the broken System variable PATH:
- Press Windows key + R to open up a Run dialog box. Then, type “sysdm.cpl” and press Enter to open System Properties.
Run dialog: sysdm.cpl - In the System Properties window, go to the Advanced tab and click on Environment Variables.
Go to the Advanced tab in System Properties and click on Environment Variables - Inside the Environment Variables window, go to System variables, select Path and click on Edit.
Edit the Path variable - In the Edit environment variable window, look for an environment variable mentioning Java. Once you see it, click on it once to select it and then click Delete.
Deleting the Java PATH environment variable - Restart your computer and see if you are able to start Eclipse at the next startup without encountering the error message.
If you’re still encountering the same error message, move down to the next method below.
Method 4: Reinstalling the JAVA JDK
If you’ve come this far without a result, you can probably resolve the issue by clean installing the latest JAVA JDK version. Several users finding themselves in a similar situation have reported that the Java Was Started but Returned Exit Code=13 Eclipse error was finally resolved after they uninstalled their current JDK and they installed the latest version available.
Here’s a quick guide on how to do this:
- Press Windows key + R to open up a Run dialog box. Then, type “appwiz.cpl” and press Enter to open Programs and Features.
Run dialog: appwiz.cpl - Inside Programs and features, scroll down through the application list and right-click > Uninstall Java Development Kit along with any updates.
Uninstalling Java Development Kit - Visit this link (here) and download the latest version of the JDK according to your OS version and bit-architecture.
Installing the latest JDK - Open the installer and complete the installation by following the on-screen prompts. Once the process is complete, restart your computer.
- See if the error message has been resolved by opening Eclipse at the next system startup.
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.
For those who are new to programming, installing Eclipse can be quite troublesome. One of the most common errors is “Java Was Started But Returned Exit Code=13 Error In Eclipse“. In this article, we will explain to you the causes of errors and how to effectively deal with them.
This error usually occurs during your Eclipse installation. Assume in the case below, when you run the path:
C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipseeclipse.exe" -vm
C:Program Files (x86)Javajre7binjavaw.exe
The system reported the error, it is displayed as follows:
Java was started but returned exit code=13
C:Program Files (x86)Javajre7binjavaw.exe
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-jar C:Program FilesEclipse-SDK-4.2-win32-x86_64eclipse\plugins/org.eclipse.equinox.launcher_1.30v20120522-1813.jar
-os win32
-ws win32
-arch x86_64
...
What causes the error and How to fix it?
Below we will analyze the causes of the above error and the most effective way to handle each of those causes.
Case 1: Conflicts between Eclipse and JDK
This is probably the most common reason why many users have this problem. If you are installing two different versions of JDK and eclipse, for example JDK 32 bit and eclipse 64 bit, the error “Java Was Started But Returned Exit Code=13 Error In Eclipse ” will occur.
Solution 1:
If this is the cause of your errors, the simple way to deal with them is to combine compatible versions. We suggest 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)
If you don’t know what your current bit version is, follow these instructions. Open the Run dialog box (Window + R), type “msinfo32” to access the system information. Continue to select System Summary / System type to check the version like the image below:
Case 2: There are special characters in eclipse installation directory
If your Eclipse installation directory contains characters like @, #, !.., the system will report an error as well.
Solution 2:
To resolve the error, you need to remove those characters. For example, your path is as follows:
C:@IDEeclipse4.6
Let’s change it to:
C:IDEeclipse4.6
Case 3: The environment path variable has a problem
In some cases, the environment variable path may be corrupted. This will cause the “Java Was Started But Returned Exit Code=13 Error In Eclipse” error to occur. The reason is that when developers update to newer versions of the application, the previous settings are messed up.
Solution 3:
The solution for the above situation is that you need to remove this faulty path. Here are the steps:
- In the Run dialog box
(Window + R)
enter “sysdm.cpl
“, the System Properties box appears. - Select
Advanced
/Environment Variables
/System Variables
. In here, look for the path relative to Java, e.g. “C:ProgramDataOracleJavajavapath
” to remove it. - And add “
C:Program FilesJavajdk1.8.0_131bin
” to the system variable.
After completing the above steps, please reboot to check.
Conclusion
We hope you enjoyed our article about discovering the answer for the topic “Java Was Started But Returned Exit Code=13 Error In Eclipse”. If you have any questions or concerns, please feel free to leave a comment. We are always excited when our posts can provide useful information.
Maybe you are interested:
- Exception in Thread “Main” Java.util.nosuchelementexception
- ERROR : ‘compileJava’ task (current target is 11) and ‘compileKotlin’ task (current target is 1.8) jvm target compatibility should be set to the same Java version in Java
- java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment
Eclipse is one of the best IDEs for Java and Android developers. There are many issues with Eclipse if it is not configured properly. One of the most common errors with Eclipse IDE is of the java exit code 13. It is common to get an error like Java was started but returned exit code=13.
For programming help you can checkout AssignmentOverflow.com
This Eclipse error is one of the most frustrating bugs to solve if you don’t know the correct method. Here I have enlisted some possible solutions for this error. You have to try all of them one by one.
If you want to hire a java developer, you can make use of online java test.
Method 1:
You may get this error if the versions of java and eclipse do not match. If you have installed 64 bit java jdk on your machine and 32 bit Eclipse IDE or vice versa, then you may get this error.
So, ensure that you have installed both the softwares with their correct versions. If you installed different versions, you will have to uninstall the softwares and install them again with the same version.
Method 2:
There are cases when you want to keep both the 32 bit version and the 64 bit version installed in your machine due to compatibility issue.
When this is the scenario, you need to correctly mention the path of the system variables in the Environment Variable Settings. You have to select either 32 bit or 64 bit in both the softwares i.e., Eclipse and Java JDK.
Suppose you select 32 bit versions, you need to go to the C drive in the JDK Folder of 32 bit version. Once you do that, you can copy the path and set it in the Environment Variable section. You won’t get the same error again.
Method 3:
Another solution to this error is by copying the Eclipse folder in the C:/Program Files folder. For some this may work. However, if it does not work, you should try putting the Eclipse Folder in the C:/Program Files (x86) folder.
We hope that at least one of the above methods will work in your system. You may have to try all the three methods. One of them will surely solve your error message “java was started but returned exit code 13”.
Method 4:
There are a lot of compatibility issues with Java 1.8 and higher versions. So, if you are not able to solve the error with the above methods, you can degrade to java 1.7 or lower version and check if the error is solved or not.
Method 5:
If you have 32 bit and 64 bit versions installed at the same time, you need to set the Eclipse to one version of Java JDK. It should be explicitly set by the user, otherwise the default version of Java will be used which may cause this Error Code 13.
The solution to this the manipulation of the eclipse.ini file. The eclipse.ini is located in the Eclipse folder. Open that file with notepad editor in windows.
You need to add the following code before the line that includes -vmargs in the eclipse.ini file.
-vm
C:Program FilesJavajdk1.7.0_40-64binjavaw.exe
The second line may be different depending upon version of the java jdk installed in your machine. If you have a 32 bit JDK version, it may be found in Program Files(x86).
Few important points to remember while configuring eclipse.ini file:
1. The Java File’s Path must be Relative Path or Absolute Path. It should not just point to the Java Home Folder.
2. The -vm option and its path should be on a separate line.
3. The -vm option should be before -vmargs option.
Here is the screenshot of an eclipse.ini file.
Comment below if you are getting any difficulty to solve Java was started but returned exit code=13 error in eclipse. I will try to help you.
I looked at all the other places and I can’t figure out how to do it.
How do you type java -version
into the console. Because all I get back is that java is not recognized as a command.
I went on the java site and I got the version 1.7.0_45
so I did this
C:Program Files (x86)Javajdk1.7.0_45binjavaw.exe
instead of
C:Program Files (x86)Javajre7binjavaw.exe
it didn’t work either
«C:Program Files (x86)Javajre7binjava.exe» -1.7.0_45
It also didn’t work.
I’ve downloaded the most recent android sdk
of October 30th from the official site.
Help?
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm C:Program Files (x86)Javajre7binjavaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40
-Xmx768m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M
cmd
11.5k6 gold badges50 silver badges61 bronze badges
asked Dec 24, 2013 at 15:59
1
The problem is that you are trying to start a 64 bit version of Eclipse with a 32 bit version of Java. You can download it from here
Start Eclipse with a 64 bit JVM and the problem will go away.
To do so:
eclipse.exe -vm c:pathto64bitbinjavaw.exe
You can also update the the first two lines in your eclipse.ini
file to use the 64 bit java by default by doing the following:
-vm
c:pathto64bitbinjavaw.exe
Also, you can also download a 32 bit version of Eclipse for use with 32 bit Java. The key is that the bitness is the same.
answered Dec 24, 2013 at 16:27
cmdcmd
11.5k6 gold badges50 silver badges61 bronze badges
1
You need Java in your bin path — or put in the full pathname.
The easiest way to make sure you have the path correct is to navigate to the folder containing the java exe (i.e. use the cd command in the cmd window, use dir to confirm you are in the correct folder) and then type java -version
and java.exe -version
there.
By navigating to the folder you have confirmed that you are going to the right location.
answered Dec 24, 2013 at 16:02
Tim BTim B
40.4k16 gold badges82 silver badges128 bronze badges
1
I looked at all the other places and I can’t figure out how to do it.
How do you type java -version
into the console. Because all I get back is that java is not recognized as a command.
I went on the java site and I got the version 1.7.0_45
so I did this
C:Program Files (x86)Javajdk1.7.0_45binjavaw.exe
instead of
C:Program Files (x86)Javajre7binjavaw.exe
it didn’t work either
«C:Program Files (x86)Javajre7binjava.exe» -1.7.0_45
It also didn’t work.
I’ve downloaded the most recent android sdk
of October 30th from the official site.
Help?
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm C:Program Files (x86)Javajre7binjavaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40
-Xmx768m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M
cmd
11.5k6 gold badges50 silver badges61 bronze badges
asked Dec 24, 2013 at 15:59
1
The problem is that you are trying to start a 64 bit version of Eclipse with a 32 bit version of Java. You can download it from here
Start Eclipse with a 64 bit JVM and the problem will go away.
To do so:
eclipse.exe -vm c:pathto64bitbinjavaw.exe
You can also update the the first two lines in your eclipse.ini
file to use the 64 bit java by default by doing the following:
-vm
c:pathto64bitbinjavaw.exe
Also, you can also download a 32 bit version of Eclipse for use with 32 bit Java. The key is that the bitness is the same.
answered Dec 24, 2013 at 16:27
cmdcmd
11.5k6 gold badges50 silver badges61 bronze badges
1
You need Java in your bin path — or put in the full pathname.
The easiest way to make sure you have the path correct is to navigate to the folder containing the java exe (i.e. use the cd command in the cmd window, use dir to confirm you are in the correct folder) and then type java -version
and java.exe -version
there.
By navigating to the folder you have confirmed that you are going to the right location.
answered Dec 24, 2013 at 16:02
Tim BTim B
40.4k16 gold badges82 silver badges128 bronze badges
1