Java 已启动但返回退出代码=13 eclipse

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20763583/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 04:10:00  来源:igfitidea点击:

Java was started but returned exit code=13 eclipse

javaandroideclipse

提问by hubertsng

I looked at all the other places and I can't figure out how to do it.

我查看了所有其他地方,但不知道该怎么做。

How do you type java -versioninto the console. Because all I get back is that java is not recognized as a command.

你如何java -version在控制台中输入。因为我得到的只是 java 不被识别为命令。

I went on the java site and I got the version 1.7.0_45

我去了java站点,得到了1.7.0_45版本

so I did this

所以我做了这个

C:\Program Files (x86)\Java\jdk1.7.0_45\bin\javaw.exe

C:\Program Files (x86)\Java\jdk1.7.0_45\bin\javaw.exe

instead of

代替

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

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

it didn't work either

它也不起作用

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

“C:\Program Files (x86)\Java\jre7\bin\java.exe”-1.7.0_45

It also didn't work.

它也没有奏效。

I've downloaded the most recent android sdkof October 30th from the official site. Help?

我已经sdk从官方网站下载了10 月 30 日的最新 android 。帮助?

-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)\Java\jre7\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40
-Xmx768m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M

采纳答案by cmd

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

问题是您正在尝试使用 32 位版本的 Java 启动 64 位版本的 Eclipse。你可以从这里下载

Start Eclipse with a 64 bit JVM and the problem will go away.

使用 64 位 JVM 启动 Eclipse,问题就会消失。

To do so:

这样做:

eclipse.exe -vm c:\path\to\bit\bin\javaw.exe

You can also update the the first two lines in your eclipse.inifile to use the 64 bit java by default by doing the following:

您还可以eclipse.ini通过执行以下操作更新文件中的前两行以默认使用 64 位 java:

-vm
c:\path\to\bit\bin\javaw.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.

此外,您还可以下载 32 位版本的 Eclipse 以与 32 位 Java 一起使用。关键是位数是一样的。

回答by Tim B

You need Java in your bin path - or put in the full pathname.

您的 bin 路径中需要 Java - 或输入完整路径名。

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 -versionand java.exe -versionthere.

做最简单的方式,以确保您有正确的路径是导航到包含文件夹中的java的exe文件(即在cmd窗口,使用DIR使用cd命令来确认你是在正确的文件夹),然后键入java -versionjava.exe -version那里。

By navigating to the folder you have confirmed that you are going to the right location.

通过导航到该文件夹​​,您已确认您将前往正确的位置。