After installing JDK 11 or above, my Visual Code Studio Terminal is still showing Java version 8 when using…
“You may be wondering, if you’ve set
PATHto point to JDK-11, why does
java -versionstill use Java 8?
Take a look at your
PATHand you’ll likely find something like
C:\ProgramData\Oracle\Java\javapathas one of the first entries (see this). This entry was added automatically when you installed Java 8 and points to the Java 8 executables (
javaws). Since it’s before your
%JAVA_HOME%\binentry, it takes precedence. However,
javacand that’s why
I just deleted the variable… all the Java 1.8 folders… and works.
FOR Gradle… Checking with
After installing it… just reopen VS Code