I downloaded language support for Java by Red Hat in Microsoft Visual Studio Code,
but I got a problem as shown in the above picture.
So I tried to set my JDK path in the settings.json
file in VSCode:
"java.home": "C:/ProgramFiles/Java/jdk1.8.0_111"
But the problem is still not solved.
Do you know how to solve this problem?
In case this question is still open.
Try placing a space between the words, Program and Files, so it reads:
you should change the path to be like this:
My Visual Studio Code is set to use the 32 bit version of JDK
A default java.exe is installed in your %SYSTEMROOT%\System32
Check java version from command line:
You might need to add your version to PATH:
And set your system JAVA_HOME:
Restart cmd and try:
echo %JAVA_HOME%
Restart Visual Studio Code and be happy.
Use
set
instead ofsetx
for local user.try to change path as follow:
Make attention to the space in "Program Files" in the path.
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
You only need to put the space in between Program and files like: