Eclipse ADT: Java was started but returned exit code=13

ⅰ亾dé卋堺 提交于 2019-11-30 09:05:42

问题


Could someone one clarify why my Eclipse (http://developer.android.com/sdk/index.html) from ADT won't start?

Every time I'm getting this error:

---------------------------
Eclipse
---------------------------
Java was started but returned exit code=13
C:\Program Files (x86)\Java\jre7\bin\javaw.exe
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-Declipse.buildId=v22.0.5-757759
-XX:MaxPermSize=256m
-jar C:\Users\Alexey\Desktop\tmp\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-os win32
-ws win32
-arch x86_64
-showsplash
-launcher C:\Users\Alexey\Desktop\tmp\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\eclipse\eclipse.exe
-name Eclipse
--launcher.library C:\Users\Alexey\Desktop\tmp\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807\eclipse_1503.dll
-startup C:\Users\Alexey\Desktop\tmp\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.overrideVmargs
-exitdata bec_34
-product com.android.ide.eclipse.adt.package.product
-vm C:\Program Files (x86)\Java\jre7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-Declipse.buildId=v22.0.5-757759
-XX:MaxPermSize=256m
-jar C:\Users\Alexey\Desktop\tmp\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\eclipse\\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar 
---------------------------
OK   
---------------------------

回答1:


Error occurs when IDE(eclipse) bit-version (i.e. 32 or 64 bit) and jre bit-version mismatch! I have downloaded the 64 bit version and it showed me the exact error. But 32-bit version worked really fine. JRE version (1.6 or 1.7) doesn't matter. I think you dont need to downgrade. Because in my case, I had Java Version 1.7.0_45, whereas SDK requires 1.6, but it still worked perfectly fine!




回答2:


Remove the following entry from your "path" System Variable- "C:\ProgramData\Oracle\Java\javapath"

Go to Control panel -> System -> Environment variable -> System Variable -> Path (Edit)

then Remove first entry which would be "C:\ProgramData\Oracle\Java\javapath".

Then eclipse will start.




回答3:


"Java was started but returned exit code=13"

error is caused when you are attempting to start Eclipse using the wrong version of the Java Virtual Machine (JVM).

Here are some recommendations to correct this error:

http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html




回答4:


Uninstall all Java SDK or JRE, specially if it´s the 8th version, so reinstall the 6th or 7th version, and check again. It worked for me :)




回答5:


Check that the version being used by Eclipse is same as shown in your error code. If not, call that version explicitly.

"C:\Program Files (x86)\Java\jre7\bin\java.exe" -version



回答6:


The error is because you have not specified the path to the javaw.exe file which is in jdk.

  1. open eclipse.ini file
  2. after vmargs command(ie below the vmargs command - since they have to be in separate lines) add the following line
    -vm C:\Program Files\Java\jdk1.7.0_51\bin\javaw.exe NOTE : that the -vm shud b in one line and the path to the javaw.exe file must be in another line
  3. save the file
  4. run the eclipse.



回答7:


I had this problem after updating my JRE. I downloaded the latest JDK and the problem was fixed. The JRE has to match the JDK for Eclipse to run.




回答8:


On Windows Environment Variables, delete the value of Path variable that contains installed Java location. Then copy the installed Java to your Android-SDK folder.

You can copy the jre folder (example C:\Program Files\Java\jdk1.7.0_51\jre) to

C:\Users\Alexey\Desktop\tmp\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\eclipse\

It solved my problem




回答9:


this happened to me as well due t mismatch in 64-bit eclipse and 32-bit java. in my case the problem was that I had downloaded java from 32-bit chrome browser (java download probably picks up 32/64 bit architecture from browser details - not sure), even though was using 64 bit windows.

Solution that worked for me...

1) uninstall java

2) restart system

3) navigate to the java download page

4) instead of choosing "Agree and Start Free Download", look for "See all Java downloads"

5) Click on the link and choose appropriate java version that matches your OS

6) install java

7) install eclipse.

done!




回答10:


this is a makeshift solution but may sort you out.

show hidden files, C:\ProgramData\Oracle\Java\javapath

you will find 3 shortcut links that are pointing to the wrong directories,

solution 1; go to C:\Program Files\Java\jre8\bin and copy out the files these links are pointing to and paste into the C:\ProgramData\Oracle\Java\javapath. Close and run again the eclipse, install updates

solution 2: go fix the environmental paths as some other solutions here suggest.

the first one worked for me




回答11:


A few more checks...

Ensure you remove all older versions of Java. Having multiple versions of the Java Runtime will cause this error. Also check what OS you are using. Is it 32-bit or 64-bit? You need to install the appropriate version of the Java runtime. You cannot run ADT/Eclipse on a 64 bit OS with a 32-bit Java runtime. Hope this helps.




回答12:


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



回答13:


The reason of the error is because your Eclipse and JDK versions are different. Solution is simple. Define what your JDK bin folder is and use eclipse -vm JDK_bin_path command.

Example: In my case a folder is C:\Program Files\Java\jdk1.8.0_25\bin Then right click on your Eclipse.exe file, select Shortcut tab, in Target field, right after eclipse.exe, write -vm "C:\Program Files\Java\jdk1.8.0_25\bin"

That's all. Let me know if you have problems.




回答14:


Only add following two line at top of eclipse.ini :-


 -vm

 C:\Program Files\Java\jdk1.7.0_60\bin/javaw.exe

Note: Replace 'jdk1.7.0_60' with your installed version




回答15:


If you still getting same error after trying all solution described here, then try to move your whole eclipse folder in the drive (D:) another than the drive ( C:) where you have installed your jdk. This worked for me



来源:https://stackoverflow.com/questions/18349517/eclipse-adt-java-was-started-but-returned-exit-code-13

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!