STS 启动错误 - Java 已启动但返回退出代码=13

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

STS launch error - Java was started but returned exit code=13

javaexit-code

提问by Sabz Mbatha

So I installed STS a while back now onto my Windows 7 64-bit machine, every time I try run STS I get the attached Java exit code=13 error below.

所以我现在在 Windows 7 64 位机器上安装了 STS,每次我尝试运行 STS 时,我都会收到下面附加的 Java 退出代码 = 13 错误。

I don't have have Eclipse installed into my machine, I mention this because every time I have tried to Google this error code threads about the same issue happening on Eclipse come up.

我没有在我的机器上安装 Eclipse,我提到这一点是因为每次我试图谷歌时,这个错误代码线程都会出现在 Eclipse 上发生的相同问题。

I have also tried checking if Java is installed on my machine which it is.

我也试过检查我的机器上是否安装了 Java。

Does anyone know how to resolve this?

有谁知道如何解决这个问题?

回答by Fran Montero

Check that you are using correct java version for your OS architecture, 32 or 64 bits

检查您的操作系统架构是否使用了正确的 Java 版本,32 位或 64 位

回答by Manoj

First you need to check that you are using 64 bitjava. Next you need to point to that version of java in your STS.inifile.

首先,您需要检查您是否正在使用64 bitjava。接下来,您需要在STS.ini文件中指向该版本的 java 。

You can do this by specifying the -vmoption in the STS.inifile. The -vmoption must be placed after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option.

您可以通过-vmSTS.ini文件中指定选项来完成此操作。该-vm选项必须放在其他特定于 Eclipse 的选项(例如 -product、--launcher.* 等)之后,但在 -vmargs 选项之前。

-vmargument might look like:

-vm参数可能如下所示:

-vm
C:\jdk1.7.0_21\bin\javaw.exe

or

或者

-vm C:\jdk1.7.0_21\bin\javaw.exe 

or

或者

-vm C:\jdk1.7.0_21\jre\bin\java.exe

If you encounter Java was started but returned exit code=1point the `-vm option to jvm.dll

如果遇到Java was started but returned exit code=1指向 jvm.dll 的 `-vm 选项

-vm
C:\Development\Javabit\jdk1.7.0_09\jre\bin\server\jvm.dll

Here is how I added it in my STS.inifile.

这是我在我的STS.ini文件中添加它的方式。

-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vm
C:\Program Files\IBM\Java71\jre\bin\java.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms40m
-XX:MaxPermSize=256m
-Xverify:none
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx1200m

References:

参考:

  1. Eclipse Wiki page

  2. Stack overflow answer by DNAto similar question

  1. Eclipse 维基页面

  2. DNA对类似问题的堆栈溢出答案

回答by AK M

Just install 32-bit JRE (if you have 64 bit already installed) and point -vm to this 32-bit JRE as mentioned above.

如上所述,只需安装 32 位 JRE(如果您已经安装了 64 位)并将 -vm 指向这个 32 位 JRE。

回答by Vikash kumar Yadav

STS mostly ends up with error code 13 if you are using for the first time. Here is a fix to the problem. Please visit this link I found here https://youtu.be/cMClVM6rzuc.

如果您是第一次使用,STS 通常会以错误代码 13 结束。这是解决问题的方法。请访问我在此处找到的链接https://youtu.be/cMClVM6rzuc

here is the summary of the solution - The Error while launching STS is mostly because you have downloaded 32 bit STS bundle from spring.io website. you need to check your system architecture and download the appropriate version. You can watch the video for detailed information. I am 100% sure you will find your solution

这是解决方案的摘要 - 启动 STS 时出错主要是因为您从 spring.io 网站下载了 32 位 STS 包。您需要检查您的系统架构并下载适当的版本。您可以观看视频了解详细信息。我 100% 相信你会找到你的解决方案

回答by sachin

I removed C:\ProgramData\Oracle\Java\javapathfrom the PATHenvironment variable. It worked for me then. So basically it's a path variable issue.

C:\ProgramData\Oracle\Java\javapathPATH环境变量中删除。当时它对我有用。所以基本上这是一个路径变量问题。

回答by TLEJMI

If you dowloaded 64 bits version of STS Spring, check the version of java you have by taping in cmd :

如果您下载了 64 位版本的 STS Spring,请通过输入 cmd 来检查您拥有的 java 版本:

java -d64 -version 

If you dont have the jre 64 bits, install it and it will work .

如果你没有 jre 64 位,安装它,它会工作。

回答by Dillon Ryan Redding

On the STS page, the Download STSbutton downloads the version for 32-bit Windows by default. Under the download button, click See all versions(https://spring.io/tools/sts/all). From there you can click the menu button and select the 64-bit Windows version.

在 STS 页面上,下载 STS按钮默认下载适用于 32 位 Windows 的版本。在下载按钮下,单击查看所有版本( https://spring.io/tools/sts/all)。从那里您可以单击菜单按钮并选择 64 位 Windows 版本。

回答by Will Wu

please make sure you download the 64bit version from https://spring.io/tools/sts/all.

请确保您从https://spring.io/tools/sts/all下载 64 位版本。

make sure you download the 64bit version from https://spring.io/tools/sts/all

确保从 https://spring.io/tools/sts/all 下载 64 位版本

回答by Moe Fawal

You likely installed the default version of STS from the spring.io website which is normally the 32 bit version.

您可能从 spring.io 网站安装了默认版本的 STS,通常是 32 位版本。

Click to see all versions and download the windows 64 bit version from the next page.

单击以查看所有版本并从下一页下载 Windows 64 位版本。

Good luck.

祝你好运。

回答by Praveen

By Removing following java path from environment variables path is fixed the issue.

通过从环境变量路径中删除以下 java 路径可以解决问题。

C:\Program Files (x86)\Common Files\Oracle\Java\javapath

C:\Program Files (x86)\Common Files\Oracle\Java\javapath

Have another jdk in path.

在路径中有另一个 jdk。