Java Spring Tool Suite 无法启动并出现错误

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

Spring Tool Suite failing to start with error

javaeclipsespringsts-springsourcetoolsuitespring-tool-suite

提问by vishal

I was using Spring tool suite, I just upgraded it to latest version spring-tool-suite-3.5.1.RELEASE-e4.3.2-linux-gtk-x86_64and now I am not able to start it. It gives below error:

我正在使用 Spring 工具套件,我刚刚将其升级到最新版本spring-tool-suite-3.5.1.RELEASE-e4.3.2-linux-gtk-x86_64,但现在无法启动它。它给出了以下错误:

VM terminated. Exit code=1
/usr/bin/java
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
-jar /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/vishal/install/sts/sts-3.5.1.RELEASE/STS
-name STS
--launcher.library /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212/eclipse_1508.so
-startup /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.overrideVmargs
-exitdata 98006
-product org.springsource.sts.ide
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
-jar /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar 

I have ubuntu 12.04 and this Java version:

我有 ubuntu 12.04 和这个 Java 版本:

java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

This is STS.ini

这是 STS.ini

-vm
/usr/lib/jvm/jdk1.7.0/bin/java
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m

回答by E-Riz

The .ini file you posted points to /usr/lib/jvm/jdk1.7.0/bin/javabut the error log shows it's actually using /usr/bin/java. That suggests you're not using the .ini you think you are. Double check you're launching from the correct directory/executable.

您发布的 .ini 文件指向/usr/lib/jvm/jdk1.7.0/bin/java但错误日志显示它实际上使用/usr/bin/java. 这表明您没有使用您认为的 .ini。仔细检查您是从正确的目录/可执行文件启动的。

回答by Kris

May not be the case here, but usually this kind of error means the JVM is 32 bit where it needs to be 64 bit or vice versa. Double check that the JVM you are using matches your downloaded STS with respect to 32/64 bit.

这里可能不是这种情况,但通常这种错误意味着 JVM 是 32 位,而它需要是 64 位,反之亦然。仔细检查您使用的 JVM 是否与您下载的 STS 相匹配(关于 32/64 位)。

Also the answer from E-Riz makes sense. Check exactly what '/usr/bin/java' actually points to (it is probably a symlink). Try the following commands

E-Riz 的回答也是有道理的。准确检查 '/usr/bin/java' 实际指向的内容(它可能是一个符号链接)。试试下面的命令

/usr/bin/java -version

Also track down the symlink

还要追踪符号链接

ls -la /usr/bin/java

This will tell you where it points (probably /etc/alternatives/java, which is another symlink. Repeat until you get to the end of the symlink chain. If this doesn't lead to where you think it should (i.e. /usr/lib/jvm/jdk1.7.0/bin/java) then E-riz is right and you are probably not running the STS.ini that you think you are.

这将告诉您它指向的位置(可能是 /etc/alternatives/java,这是另一个符号链接。重复直到到达符号链接链的末尾。如果这没有导致您认为它应该指向的位置(即 /usr/ lib/jvm/jdk1.7.0/bin/java) 那么 E-riz 是对的,您可能没有运行您认为的 STS.ini。

回答by Arit

I am not a java developer but had to look into java code.I faced the same issue stated above and fixed it in different way. located STS.ini, opened it and changed the version from 1.6 to 1.7. bingo... its started working..

我不是 Java 开发人员,但必须查看 Java 代码。我遇到了上述相同的问题并以不同的方式修复了它。找到 STS.ini,打开它并将版本从 1.6 更改为 1.7。宾果游戏……它开始工作了……

回答by jprism

I faced the same problem after another software updated 1.8 32 bit client VM, where I am running on 64 bit Windows 7. This issue was resolved after I installed JDK 1.8 64 bit Server VM.

在另一个软件更新 1.8 32 位客户端 VM 后,我遇到了同样的问题,我在 64 位 Windows 7 上运行。这个问题在我安装 JDK 1.8 64 位服务器 VM 后得到解决。

回答by Do Nhu Vy

The above error cause by STS version.

上述错误由 STS 版本引起。

At this site: http://spring.io/tools/sts/all, Download STS version what support 32 bit (x86)or 64 bit (x64)computer.

enter image description here

在这个站点:http: //spring.io/tools/sts/all,下载支持32 位(x86)64 位(x64)计算机的STS 版本。

在此处输入图片说明

回答by Gouranga Tarafder

I tried to resolve this error in so many ways, but nothing worked for me. At last I uninstalled all my java installations from Control Panel, and reinstalled Java 1.8 and it worked :)

我试图以多种方式解决此错误,但没有任何效果对我有用。最后我从控制面板卸载了我所有的 java 安装,并重新安装了 Java 1.8 并且它工作了:)

回答by Vikash kumar Yadav

This error with STS is pretty common when you start for the first time. Here is what I found on YouTube, will help eliminate the error: https://youtu.be/cMClVM6rzuc

当您第一次启动时,这个 STS 错误很常见。这是我在 YouTube 上找到的内容,有助于消除错误:https: //youtu.be/cMClVM6rzuc

回答by Thisisalexis

I had the same issue when trying to open Sprint STS on my Windows machine (64 bits).

尝试在我的 Windows 机器(64 位)上打开 Sprint STS 时,我遇到了同样的问题。

The problem was, in fact, that the STS download page, by default, downloads the Windows 32 bits version and it was not working because of that on my 64 bits Windows.

事实上,问题在于 STS 下载页面默认下载的是 Windows 32 位版本,因此在我的 64 位 Windows 上无法正常工作。

I just went to the STS download page again and download the right version (64 bits) and it solved my issue.

我刚刚再次转到 STS 下载页面并下载了正确的版本(64 位),它解决了我的问题。

Best regards!

此致!