If the Java path is not in your global settings, configure the JAVA_HOME variable using the following scripts.

Script

OS

Example

​bin/setenv.sh

​Linux

export JAVA_HOME=/usr/java/jdk-17.0.6

bin/setenv.bat

Windows

set JAVA_HOME=C:\Program Files\Java\jdk-17.0.6