0

I have a client project which is running on an older version of Spring/Spring STS for the time being. For my own personal interests, I'd like to install java8. However, when I do this, it prevents STS (which needs java 1.7 in this case) from starting up.

To fix this, I've added a line to the 1.7 in STS.ini:

-vm /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin

but still no luck. I've also tried starting it from the terminal after setting java home to java 1.7 in the bash profile, but that doesn't do the trick either.

There aren't any error messages in the log. STS just displays the prompt to select the workplace, but the continue button is not highlighted as usual and nothing happens when I press it.

There must be some other configuration option, but I haven't worked it out yet. Any ideas?

edit: I also tried adding the following to Info.plist:

<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/java</string>

based on this comment in the Info.plist:

<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
-->

But, still the same error.

Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213
  • Any `-vm` in the ini file must be **two** lines - one for `-vm` and a second line with the path. It must be before any `-vmargs` line. – greg-449 Nov 20 '17 at 08:10
  • It worked!.The key was placing it before the -vmargs. Thanks, and ps. feel free to move to an answer! – Jack BeNimble Nov 20 '17 at 15:04

0 Answers0