5

I am unable to start my STS (Spring Tool Suite) on my new macOS - High Sierra Version - 10.13.6

The following are the contents of my STS.ini file -startup ../Eclipse/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar --launcher.library ../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.551.v20171108-1834 -product org.springsource.sts.ide --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.8 --add-modules=ALL-SYSTEM -Xms384m -Dosgi.module.lock.timeout=10 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Xdock:icon=../Resources/sts.icns -Xmx1200m -XX:+UseCompressedOops

  1. Java version - openjdk version "1.8.0_144"
  2. STS version - 3.9.6
  3. Mac Version - 10.13.6

Tried adding -vm option with value /Library/Java/JavaVirtualMachines/1.8.144_1_openJDK_macosx.jdk/Contents/Home and changing Xmx/Xms to different values in my STS.ini but nothing worked. Any suggestions?

saranya elumalai
  • 429
  • 2
  • 5
  • 14

2 Answers2

7

Faced a similar issue when I upgraded Java from Java 8 to openjdk 14. I resolved it by doing the following:

Open /Applications/SpringToolSuite4.app/Contents/Eclipse/SpringToolSuite4.ini

Add the following lines to the start of the file and save it:

-vm
/Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/Home/bin/java

Now, you need to point the softlink of libjli.dylib inside /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/ to the right location. To do that, do the following:

cd /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/MacOS/
sudo rm libjli.dylib 
sudo ln -s /Library/Java/JavaVirtualMachines/openjdk-14.jdk/Contents/Home/lib/libjli.dylib libjli.dylib

Now, try opening SpringToolSuite4 and it should work seamlessly. If you are using another version of jdk, make sure that the path is chosen correctly in the ini file as well as the softlink creation part. Note: You do not need to play around with vmargs to adjust the -Xms and -Xmx args to resolve this.

Kavitha Karunakaran
  • 1,340
  • 1
  • 17
  • 32
6

open file /Applications/SpringToolSuite4.app/Contents/Eclipse/SpringToolSuite4.ini

add

--launcher.appendVmargs
-vm
/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/bin/java
Hami
  • 704
  • 2
  • 9
  • 27
willx lopez
  • 61
  • 1
  • 2