STS is failing to start on my machine

依然范特西╮ 提交于 2019-12-13 12:27:14

问题


I was trying to setup Spring mvc projects on eclipse. Basic projects were working fine. But using restful services, jersey etc started giving so many errors related to dependencies. So I am planning to move on to STS.

I am using STS 2.9.2. It was giving me "failed to create java virtual machine". So I added

-vm C:\Program Files\Java\jdk1.7.0\bin\javaw.exe

to STS.ini. But now it is giving me following fatal error

Below is STS.ini

-vm
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
884M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmn128m
-Xms256m
-Xmx768m
-Xss1m
-XX:PermSize=384m
-XX:MaxPermSize=768m
  • Eclipse is working perfectly on my machine.
  • I don't want to use Maven or other build tools to solve dependencies related problem due to limited internet speed.

回答1:


Initially I was using STS zip version. Now I installed STS from executable. And it is working fine for me. I required to setup HOME variable, that's all.

Attaching the STS.ini from installed STS (for reference).

-vm
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m



回答2:


Delete STS.ini file. then it runs correctly and creates a new STS.ini File Automatically




回答3:


I had the same problem yesterday morning. After googling, I saw that the following lines in the STS.ini file were missing (orange marked): STS.ini

After adding:

-vm

[full path to the javaw.exe]

everything worked again properly.

HTH




回答4:


Added line -vm C:\Program Files\Java\jdk1.8.0_45\bin\javaw.exe at the top of sts.ini and it worked for me




回答5:


Try running it as administrator. Right Click --> Run as Administrator.




回答6:


I'd same issue, On looking at the STS.ini file saw there was double entry of -vm argument. This error happened to me on updating the STS. Also if it still does not work try running the eclipsec.exe and if that work, then something in ini file is not set correctly.




回答7:


Make sure your STS and JDK that you provide while initializing STS is compatible. What I mean by this is that if your JDK is 64 bit then you should install 64 bit version of Spring suite (spring-web-4.0.a.RELEASE-installer-x86_64.exe) and not the 32 bit one.




回答8:


If you are using 32 bit OS, please install 32-bit version of Java 1.8 and similarly 64bit version of java for 64 bit machine.

Also, add below vm configurations to your STS.ini file


-vm 
C:\Users\bmeharn\Documents\Softwares\Java8\jdk1.8.0_131\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.500.v20170531-1133
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms40m
-Dosgi.module.lock.timeout=10
-Xverify:none
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx1200m



回答9:


There are two different downloaders of the STS IDE. May be you have downloaded 32 bit version instead of 64 bits version. Downloaded zip somehow has win32 in either cases.




回答10:


Try Below things and this will surely resolve your issue:

  1. Check your OS (32 or 64 bit) and then check STS whether it is compatible with 32 or 64 bit or for both. Now check your jdk (32 or 64 bit)
  2. If step 1 is validated then update javaw.exe path on top in STS.ini as given below. Make sure there are no duplicate entries for this path in STS.ini and path is also correct

-vm C:\Program Files\Java\jdk1.8.0_191\bin\javaw.exe

Done your STS will surely run, best luck !




回答11:


Updated -vm properties but still not working. Running sts as Administrator worked for me.



来源:https://stackoverflow.com/questions/13813112/sts-is-failing-to-start-on-my-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!