I downloaded language support for Java by Red Hat in Microsoft Visual Studio Code,
<
You have to restart VS Code after entering the java.home variable in the settings file.
Alternatively, setting that variable isn't even required. You can remove it from your settings and VS Code will automatically check your user/system environment variables for JDK_HOME and JAVA_HOME.
See "Setting the JDK" at https://marketplace.visualstudio.com/items?itemName=redhat.java
For information on how to set the environment variables, see Environment variables for java installation