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.
Amit Kumar Gupta
  • 7,193
  • 12
  • 64
  • 90

12 Answers12

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
Amit Kumar Gupta
  • 7,193
  • 12
  • 64
  • 90
  • 1
    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. – noquery Feb 14 '13 at 00:54
  • 1
    I just added -vm to STS.ini before the -startup option. I was able to start STS. Thank you! – a_secenthusiast Nov 13 '15 at 19:06
4

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

Khalid Bin Huda
  • 1,583
  • 17
  • 16
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.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
user2902426
  • 77
  • 1
  • 6
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

Rohit
  • 339
  • 1
  • 5
  • 16
0

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

Kumar Sambhav
  • 7,503
  • 15
  • 63
  • 86
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.

vik86
  • 31
  • 2
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.

Aniket Thakur
  • 66,731
  • 38
  • 279
  • 289
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
Karthikeyan
  • 2,634
  • 5
  • 30
  • 51
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.

Sanjay KK
  • 11
  • 2
  • 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. – Amit Kumar Gupta Jul 06 '18 at 04:07
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 !

Sachin Ghumbre
  • 179
  • 1
  • 5
0

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

0

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

desertnaut
  • 57,590
  • 26
  • 140
  • 166
uma mahesh
  • 131
  • 1
  • 5