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
To fix this, you will need to uninstall the problematic JDK version and install the latest one on your macOS machine: Run the /usr/libexec/java_home -V command to list all installed JVM versions.
Error: A fatal exception has occurred. Program will exit. You can try installing JDK 9 or any version later and check for java --version it will work. Save this answer.
Signals that an unrecoverable error has occurred. Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With