STS is failing to start on my machine
Asked Answered
E

12

5

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

enter image description here

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.
Echinate answered 11/12, 2012 at 3:19 Comment(2)
are you mixing 64bit STS with 32bit JDK(or vice versa)?Terms
This question is very old. And I haven't use STS after that. So I may not be able to try any other answer.Echinate
E
11

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
Echinate answered 12/12, 2012 at 1:2 Comment(2)
I am not finding any big difference in both ini files. I guess problem should be somewhere else. I hope you have set all required environment variables.Perdita
I just added -vm <ful path of javaw.exe> to STS.ini before the -startup option. I was able to start STS. Thank you!Stinger
F
4

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

Fantast answered 10/7, 2016 at 4:21 Comment(0)
S
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.

Steadfast answered 23/8, 2016 at 6:30 Comment(1)
thanks it worked, by the way it happened after I installed java 7 on my machine along with java 8Penetralia
T
2

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

Tuberosity answered 31/1, 2017 at 14:11 Comment(1)
thanks it worked, by the way it happened after I installed java 7 on my machine along with java 8Penetralia
T
0

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

Taste answered 25/3, 2014 at 10:35 Comment(0)
D
0

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.

Diesel answered 11/4, 2015 at 9:42 Comment(0)
R
0

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.

Rhoden answered 28/8, 2015 at 5:44 Comment(0)
S
0

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
Smelser answered 10/10, 2017 at 15:10 Comment(0)
T
0

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.

Tatianna answered 5/7, 2018 at 11:39 Comment(1)
As this post is around 6 years old, I didn't remember the exact problem. But I didn't use the STS after that. As per my answer I guess the problem was related to environment variable only.Echinate
P
0

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 !

Postprandial answered 30/12, 2018 at 4:54 Comment(0)
S
0

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

Suspect answered 22/5, 2019 at 16:51 Comment(0)
D
0

If your workspace in one drive make sure that your one drive is running in windows

Dupuy answered 24/7, 2023 at 10:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.