'Java JDK VScode issues
I installed java jdk using sdkman on my windows machine. I am using wsl for this purpose.
However, I need to add this to my VScode and when I look at the installed jdk's available to me I only see these:
This does not display the JDK I installed using sdkman which is located in the folder \\wsl$\Ubuntu\home\devt\.sdkman\candidates\java
. I do not know how to direct my JAVA_HOME
variable to this location.
Solution 1:[1]
They now provide a complete extension for connection to wsl. WSL is a separate user-space inside NT kernel. Your VS-Code is running in windows userspace. Hard way to do it would be to remote into your wsl, and configure there. Easy way would be to install vscode inside wsl, because windows now let you install and use linux GUI apps via wsl. Or use the extension they provide, which works on the microsoft build of vscode,( It doesn't work with non-microsoft binaries of vscode, like code-oss, vscodium etc.)
Complete instructions on working with WSL is documented here. https://code.visualstudio.com/docs/remote/wsl
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Abhinav Kulshreshtha |