I installed the Windows Subsystem for Linux on my Windows 10 machine. I am trying to do all my salesforce development in WSL so I can rely on the Linux CLI in my integrated terminal in VSCode. To do that I installed the Remote Development Extension Pack and I installed the Salesforce Extension Pack in WSL.
Whenever I open an sfdx project in WSL, I get the error message: "Java runtime could not be located. Set one using the salesforcedx-vscode-apex.java.home VS Code setting. For more information, go to Set Your Java Version.
Source: Apex (Extension)"
I set my JAVA_HOME to /mnt/d/Program Files/Java/jdk-11.0.3 in WSL because when I run whereis java one of the results I get is /mnt/d/Program Files/Java/jdk-11.0.3/bin/java.dll. I also added {%JAVA_HOME}/bin to my path in WSL.
I have tried every variation I could think of when trying to set the salesforcedx-vscode-apex.java.home variable in my settings, including both the windows and linux paths to jdk-11.0.3.