[java] Eclipse gives “Java was started but returned exit code 13”

All hell broke loose after i uninstalled my java 6 and installed java 7 (both jdk and jre). On opening eclipse it gave the error that "No JVM found at.....". So, i explicitly gave the location of javaw.exe as

-vm

C:\Progra~2\Java\jdk1.7.0_45\bin\javaw.exe

in the eclipse.ini file. Now it says "Java was started but returned exit code 13". Also, in the elispse.ini file i changed -Dosgi.requiredJavaVersion=1.5 to -Dosgi.requiredJavaVersion=1.7

There are many solutions online like :

MyEclipse 10 does not start "Java was started but returned exit code 13"

but none of them works. Any insight?

This question is related to java eclipse jvm

The answer is


Check you PATH environment variable once. Make sure the correct location of your JDK is specified there.


When I uninstalled Java 8 it worked fine.


The solution can be found here

The eclipse.ini file should be somewhat like this...

-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
adtproduct
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:\Program Files\Java\jdk1.8.0_25\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m

I installed 32 bits ADT and It works fine without changing my configuration (Windows 7 64 bits, Java 6 32 bits).


enter image description hereI got this fixed by doing the below steps,

  1. The 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 (ProgramFiles(x84)) folder location

  2. I corrected it to Program Files path(64 bit) and the issue got resolved

Please find the screenshot for the same.


It would be the 32 bit version of eclipse , for instance if you are running the 32 bit version of eclipse in 64 bit JVM, this error will be the result.

To confirm this check for log in your configuration folder of the eclipse. Log will be as following java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM ...

try installing the either 64 bit eclipse or run in 32 bit jvm


I could resolve this issue by changing JDK1.8 64bit version to JDK 1.8 32bit(x86) version


I had the same problem. i was using windows8 with 64 bit OS. I just changed the path to Program Files(*86) and then it started work. I put this line in eclipse.ini file like,

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

This problem happened because either u install new version of jdk so you have both 32bit version and 64bit

how to solve the problem is just go open computer & go to c then you will see location

after that you probably use 32 bit so just chose C:\Program Files and there you will find folder called java

in it location 2

so you have many different version of jdk so easily chose jre7 and to to bin and you will find javaw.exe in it like loaction 3

now only just take that path copy and go to start type eclipse.ini you will see text file just open it and before -vmargs

write -vm enter path like photo finally

now just open eclipse again and have fun :D


Instead of opening eclipse.exe , first open folder named configuration then you will get log file like 1401241141809.log ; open that log (open latest one) detail error will be listed there. Ex: java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM

means you need to have JVM and SDK of same version.


In your eclipse.ini file simply put

–vm
/home/aniket/jdk1.7.0_11/bin(Your path to JDK 7)

before -vmargs line.


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to jvm

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 How can I get a random number in Kotlin? Kotlin unresolved reference in IntelliJ Is JVM ARGS '-Xms1024m -Xmx2048m' still useful in Java 8? Android Gradle Could not reserve enough space for object heap Android java.exe finished with non-zero exit value 1 Android Studio Gradle project "Unable to start the daemon process /initialization of VM" Android Studio - No JVM Installation found Android Studio error: "Environment variable does not point to a valid JVM installation" Installing Android Studio, does not point to a valid JVM installation error