开发者

failed to create java virtual machine error in springsource tool?

开发者 https://www.devze.com 2023-03-25 23:43 出处:网络
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?

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 开发者_JAVA技巧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


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


Today I had this problem with spring source tool and the resolution specified here worked better: Could not create the Java virtual machine

-Xmn128m
-Xms256m
-Xmx768m 
-Xss1m
-XX:PermSize=128m
-XX:MaxPermSize=384m

Reduced/changed max heap size to be same as MaxPermSize, and STS started without issues. -Xmx768m ---> -Xmx384m

Make sure your heap sizes are less than your RAM.


For anyone who may have a similar issue as myself, your path to javaw.exe may be different. My path turned out to be:

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

In the command line, run where java and use that path to javaw.exe


Combining these two lines worked for me also. -vm C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe


Today I had this problem with spring source tool and the resolution specified here worked better:

Reduced/changed max heap size to be same as MaxPermSize, and STS started without issues

-XX:PermSize=128m, Xmx768m ---> -Xmx384m

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号