I really need your help: I can't install and configure Java in VS Code, on Linux Mint.
I've looked for videos, tutorials and the like, but without success. I've already edited /etc/bash.bashrc, /etc/enviroment and finally, my last configuration attempt was /etc/profile, where I included:
JAVA_HOME=/usr/lib/jvm/java-18-openjdk-amd64/
PATH=$JAVA_HOME/bin:$PATH export PATH JAVA_HOME
CLASSPATH=$JAVA_HOME/lib/tools.jar
CLASSPATH=.:$CLASSPATH
export JAVA_HOME PATH CLASSPATH
However, when I try to run a Run and Debug in VS Code, the return I get is just this:
This way, I can't run something in Java in VS Code.
The error prompts that the jdk path you set is wrong. Please set it to the root directory of the java installation path. (At least JDK 17 version is required).
Also you are using Code Runner to execute the program, which may throw an error. Please use the official Java extension package to execute the program.