$show=/label

[Fixed] Java was started but returned exit code=13 - Can't start Eclipse

SHARE:

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.

Java was started but returned exit code=13 

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.



[Fixed] Java was started but returned exit code=13 - Can't start Eclipse


We might be experiencing these errors after updating the java version or running OS or JAVA irrelevant eclipse versions.

1.1 Eclipse Error 

Java was started but returned exit code=13

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)



[Fixed] Java was started but returned exit code=13 - java version



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)\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


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)\Java\jdk1.8.0_201\bin\javaw.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)\Java\jre1.8.0_131\bin\javaw.exe"
For 64 bit eclipse --> add "-vm C:\Program Files\Java\jre1.8.0_131\bin\javaw.exe"

From eclipse.ini file:

After adding -vm arguement.

--launcher.appendVmargs
-vm 
C:\Program Files (x86)\Java\jdk1.8.0_201\bin\javaw.exe
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC



-vm -javaw.exe Java was started but returned exit code=13

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

COMMENTS

BLOGGER

About Us

Author: Venkatesh - I love to learn and share the technical stuff.
Name

accumulo,1,ActiveMQ,2,Adsense,1,API,37,ArrayList,16,Arrays,7,Bean Creation,3,Bean Scopes,1,BiConsumer,1,Blogger Tips,1,Books,1,C Programming,1,Collection,5,Collections,22,Collector,1,Command Line,1,Compile Errors,1,Configurations,7,Constants,1,Control Statements,8,Conversions,6,Core Java,81,Corona India,1,Create,2,CSS,1,Date,3,Date Time API,4,Dictionary,1,Difference,1,Download,1,Eclipse,2,Efficiently,1,Error,1,Errors,1,Exception,1,Exceptions,3,Fast,1,Files,9,Float,1,Font,1,Form,1,Freshers,1,Function,3,Functional Interface,2,Garbage Collector,1,Generics,4,Git,4,Grant,1,Grep,1,HashMap,1,HomeBrew,2,HTML,2,HttpClient,2,Immutable,1,Installation,1,Interview Questions,5,Iterate,2,Jackson API,3,Java,29,Java 10,1,Java 11,5,Java 12,5,Java 13,2,Java 14,2,Java 8,66,Java 8 Difference,2,Java 8 Stream Conversions,2,java 8 Stream Examples,3,Java 9,1,Java Conversions,11,Java Design Patterns,1,Java Files,1,Java Program,2,Java Programs,65,java.lang,5,java.util. function,1,jQuery,1,Kotlin,10,Kotlin Conversions,3,Kotlin Programs,6,Lambda,1,lang,29,Leap Year,1,live updates,1,Logging,1,Mac OS,2,Math,1,Maven,1,Method References,1,Mockito,1,MongoDB,3,New Features,1,Operations,1,Optional,6,Oracle,5,Oracle 18C,1,Partition,1,Patterns,1,Programs,1,Property,1,Python,2,Quarkus,1,Read,1,Real Time,1,Recursion,2,Remove,2,Rest API,1,Schedules,1,Serialization,1,Servlet,1,Sort,1,Sorting Techniques,8,Spring,2,Spring Boot,23,Spring Email,1,Spring MVC,1,Streams,21,String,58,String Programs,9,String Revese,1,Swing,1,System,1,Tags,1,Threads,10,Tomcat,1,Tomcat 8,1,Troubleshoot,16,Unix,2,Updates,3,util,5,While Loop,1,
ltr
item
JavaProgramTo.com: [Fixed] Java was started but returned exit code=13 - Can't start Eclipse
[Fixed] Java was started but returned exit code=13 - Can't start Eclipse
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.
https://3.bp.blogspot.com/-zvdNz9xAw6o/XKxvgq7BpBI/AAAAAAAABTY/fg735-VwGk0KSO-yNa-h4567HgIuNmbSgCLcBGAs/s640/Java%2Bwas%2Bstarted%2Bbut%2Breturned%2Bexit%2Bcode%253D13%2B-%2BCan%2Bnot%2Bstart%2BEclipse%2B-%2BSolution.PNG
https://3.bp.blogspot.com/-zvdNz9xAw6o/XKxvgq7BpBI/AAAAAAAABTY/fg735-VwGk0KSO-yNa-h4567HgIuNmbSgCLcBGAs/s72-c/Java%2Bwas%2Bstarted%2Bbut%2Breturned%2Bexit%2Bcode%253D13%2B-%2BCan%2Bnot%2Bstart%2BEclipse%2B-%2BSolution.PNG
JavaProgramTo.com
https://www.javaprogramto.com/2017/08/java-was-started-but-returned-exit.html
https://www.javaprogramto.com/
https://www.javaprogramto.com/
https://www.javaprogramto.com/2017/08/java-was-started-but-returned-exit.html
true
3124782013468838591
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content