I downloaded language support for Java by Red Hat in Microsoft Visual Studio Code,
If you are using bash from VSCode, should use:
export JAVA_HOME=/c/Program\ Files/Java/jdk1.8.0_172
You can use this in the terminal there.