STS launch error - Java was started but returned e

2020-03-08 08:51发布

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.

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.

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

Does anyone know how to resolve this?

16条回答
淡お忘
2楼-- · 2020-03-08 08:52

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

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

Have another jdk in path.

查看更多
迷人小祖宗
3楼-- · 2020-03-08 08:54

First you need to check that you are using 64 bit java. Next you need to point to that version of java in your STS.ini file.

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

-vm argument might look like:

-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=1 point the `-vm option to jvm.dll

-vm
C:\Development\Java\64bit\jdk1.7.0_09\jre\bin\server\jvm.dll

Here is how I added it in my STS.ini file.

-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 DNA to similar question

查看更多
Root(大扎)
4楼-- · 2020-03-08 08:54

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

查看更多
我想做一个坏孩纸
5楼-- · 2020-03-08 08:56

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

查看更多
小情绪 Triste *
6楼-- · 2020-03-08 08:57

You just need to reinstall JDK(same or latest version) and STS(not always required).

查看更多
欢心
7楼-- · 2020-03-08 09:00

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

java -d64 -version 

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

查看更多
登录 后发表回答