Java – failed to create java virtual machine error in springsource tool

javaspring

I have downloaded springsource tool. But on install, it is giving me error "failed to create java virtual machine". Can anyone suggest me some solution?

This is my sts.ini

-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
384M
-vm C:\Program Files\Java\jdk1.6.0\bin\javaw.exe
-vmargs

-Dosgi.requiredJavaVersion=1.5

-Xmn128m
-Xms256m

-Xmx768m

-Xss1m
-XX:PermSize=128m
-XX:MaxPermSize=384m

Best Answer

Find your sts.ini file usually in the root directory where you installed spring, try adding this as the first line in the file, make sure it points to YOUR JDK (You may need to change the path), also sometimes you need to put -vm and the path on different lines.

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

My sts.ini

-vm
C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1.R36x_v20100810
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
Related Topic