So I recently installed OpenJDK 17 for Linux and it came to me as a tar.gz file. I installed it after clicking a link I got on vs code after installing a java extension pack (I had Java 11 installed by default, but I decided to get the latest version), under the adoptium's temurin tab of installing Java from vsc. So after doing so I reloaded the screen, but still no change. Vs code is still not detecting java 17 or 11 is installed. Also when I type java --version
in the terminal, I get :
OpenJDK 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
How do I make Java 17 the default version for VSC?
You've added jDK11 to PATH, discard this configuration then add jdk17 to PATH.
Then turn to VS Code, open User Settings.json
and add
"java.home": "<path to jdk17>",
Then reload window to make this change effective.
I did the following steps to fix the issue(I use Debian based Linux OS):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With