Eclipse ADT:Java 已启动但返回退出代码=13
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18349517/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse ADT: Java was started but returned exit code=13
提问by Alexey Strakh
Could someone one clarify why my Eclipse (http://developer.android.com/sdk/index.html) from ADT won't start?
有人可以澄清为什么我的来自 ADT 的Eclipse ( http://developer.android.com/sdk/index.html) 无法启动吗?
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
---------------------------
采纳答案by Abu Shumon
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!
当 IDE(eclipse) 位版本(即 32 或 64 位)和 jre 位版本不匹配时会发生错误!我已经下载了 64 位版本,它向我显示了确切的错误。但是 32 位版本真的很好用。JRE 版本(1.6 或 1.7)无关紧要。我认为你不需要降级。因为在我的例子中,我有 Java 版本 1.7.0_45,而 SDK 需要 1.6,但它仍然工作得很好!
回答by Juned Ahsan
"Java was started but returned exit code=13"
“Java 已启动但返回退出代码=13”
error is caused when you are attempting to start Eclipse using the wrong version of the Java Virtual Machine (JVM).
当您尝试使用错误版本的 Java 虚拟机 (JVM) 启动 Eclipse 时会导致错误。
Here are some recommendations to correct this error:
以下是一些纠正此错误的建议:
http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
回答by Minav Patel
Check that the version being used by Eclipse is same as shown in your error code. If not, call that version explicitly.
检查 Eclipse 使用的版本是否与错误代码中显示的版本相同。如果没有,请显式调用该版本。
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -version
回答by Ram Iyer
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.
确保删除所有旧版本的 Java。拥有多个版本的 Java 运行时会导致此错误。还要检查您使用的是什么操作系统。它是 32 位还是 64 位?您需要安装相应版本的 Java 运行时。您不能在具有 32 位 Java 运行时的 64 位操作系统上运行 ADT/Eclipse。希望这可以帮助。
回答by Lavanya
The error is because you have not specified the path to the javaw.exe file which is in jdk.
错误是因为你没有指定jdk中javaw.exe文件的路径。
- open eclipse.ini file
- 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 - save the file
- run the eclipse.
- 打开 eclipse.ini 文件
- 在 vmargs 命令之后(即在 vmargs 命令下方 - 因为它们必须在单独的行中)添加以下行
-vm C:\Program Files\Java\jdk1.7.0_51\bin\javaw.exe 注意:-vm shud b 在一行中,javaw.exe 文件的路径必须在另一行中 - 保存文件
- 运行日食。
回答by EliuX
Uninstall all Java SDK or JRE, specially if it′s the 8thversion, so reinstall the 6thor 7thversion, and check again. It worked for me :)
卸载所有Java SDK或JRE,特别是第8个版本,所以重新安装第6个或第7个版本,并再次检查。它对我有用:)
回答by Art
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.
更新我的 JRE 后我遇到了这个问题。我下载了最新的JDK,问题解决了。JRE 必须与 JDK 匹配才能运行 Eclipse。
回答by cuwid
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.
在 Windows 上Environment Variables
,删除包含已安装 Java 位置的 Path 变量的值。然后将安装的 Java 复制到您的 Android-SDK 文件夹中。
You can copy the jre folder (example C:\Program Files\Java\jdk1.7.0_51\jre
) to
您可以将 jre 文件夹(示例C:\Program Files\Java\jdk1.7.0_51\jre
)复制到
C:\Users\Alexey\Desktop\tmp\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\eclipse\
It solved my problem
它解决了我的问题
回答by Sojourner
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.
由于 64 位 eclipse 和 32 位 java 不匹配,这也发生在我身上。就我而言,问题是我从 32 位 chrome 浏览器下载了 java(java 下载可能从浏览器详细信息中获取 32/64 位架构 - 不确定),即使使用的是 64 位窗口。
Solution that worked for me...
对我有用的解决方案......
1) uninstall java
1)卸载java
2) restart system
2)重启系统
3) navigate to the java download page
3)导航到java下载页面
4) instead of choosing "Agree and Start Free Download", look for "See all Java downloads"
4) 不要选择“同意并开始免费下载”,而是寻找“查看所有 Java 下载”
5) Click on the link and choose appropriate java version that matches your OS
5) 单击链接并选择与您的操作系统匹配的合适的 Java 版本
6) install java
6)安装java
7) install eclipse.
7)安装eclipse。
done!
完毕!
回答by Raj Sharma
Removethe following entry from your "path"System Variable- "C:\ProgramData\Oracle\Java\javapath"
从“路径”系统变量- “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".
然后删除第一个条目,即"C:\ProgramData\Oracle\Java\javapath"。
Then eclipse will start.
然后日食将开始。