I have been running STS4 on my MAC without trouble for some time, however I only had Oracle's JRE installed as shown below:
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Yesterday I installed the OpenJDK 11 package using Brew. Now I (also) have
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
After doing this, STS4 refuses to start with the error shown. I then 1. Uninstalled and then reinstall STS to get the most current version. Same error on start-up 2. Using suggestions from here, updated the SpringToolsSuite4.ini and attempted to add a -vm argument. This also did not work.
So...??? I'd like STS to use the 8 JDK as it's default and, as I want to, java projects can get set to 8 or 11 depending on things.
One other tidbit. Under System/Preferences window I only see the 8 JDK even though I have 8 and 11 installed, but I don't see a way to tell this setup preferences window to do that???