Article 5KBNH Linux Mint 20.1, VSCode - Doesn't recognize OpenJDK

Linux Mint 20.1, VSCode - Doesn't recognize OpenJDK

by
SlowCoder
from LinuxQuestions.org on (#5KBNH)
Here's my Java configuration:
I have Java 16 JDK installed at /usr/lib/jvm/java-16-openjdk-amd64
(I've also tried with v11 and 13.)

I have added following lines to .bashrc:
Code:export JAVA_HOME=/usr/lib/jvm/java-16-openjdk-amd64
export JDK_HOME=/usr/lib/jvm/java-16-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/binI've installed the following extensions in VSCode:
Language Support for Java (RedHat)
Debugger for Java
Maven for Java
Java Test Runner

In settings.json, I have:
Code:"java.home": "/usr/lib/jvm/java-16-openjdk-amd64/bin"When I open VSCode, and try to open a .js document, I get the following error:
Code:The java.home variable defined in Visual Studio Code settings points to a missing or inaccessible folder (/usr/lib/jvm/java-16-openjdk-amd64/bin)When I cd to that path, it comes up fine, and I can execute 'bin/java -version', so it seems the error is bunk.

(I've also tried /usr/lib/jvm/java-1.16.0-openjdk-amd64/bin throughout)

Where have I gone wrong?latest?d=yIl2AUoC8zA latest?i=CBFeASggDzI:sYfxXZjuTBU:F7zBnMy latest?i=CBFeASggDzI:sYfxXZjuTBU:V_sGLiP latest?d=qj6IDK7rITs latest?i=CBFeASggDzI:sYfxXZjuTBU:gIN9vFwCBFeASggDzI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments