VSCode JAVA_HOME Sync between Windows & Ubuntu need different path

VSCode Settings Sync in Windows & Linux need different JAVA_HOME path

Problem

When using Settings Sync in my work PC which uses windows, JAVA_HOME has a path like C:\\....
When using my home PC with Ubuntu the path goes around /usr/opt/jvm/...
So the path keeps overriding when i swap between my home & work PC.

Solution

Just like the config for integrated shell which has a different config for each OS, you should have a config variable for each OS, here’s the example config for shell:
terminal.integrated.shell.windows
terminal.integrated.shell.linux
terminal.integrated.shell.osx

Env info

  • SonarLint Plugin version 1.8.0
  • VSCode info:
    • Version: 1.34.0 (user setup)
    • Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758
    • Date: 2019-05-15T21:59:37.030Z
    • Electron: 3.1.8
    • Chrome: 66.0.3359.181
    • Node.js: 10.2.0
    • V8: 6.6.346.32
    • OS: Windows_NT x64 10.0.17763