'Java_home: /usr/lib/jvm/jdk17/bin doesn’t look like a JDK directory

Installed Jdk-17 on Jenkins master(Linux) and when triggered a build getting these errors

"The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE"

Source:- "https://download.oracle.com/java/17/archive/jdk-17.0.2_linux-x64_bin.tar.gz"



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source