1/usr/libexec/java_home -V
2# Matching Java Virtual Machines (2):
3# 16.0.1, x86_64: "Java SE 16.0.1"
4# 11.0.11.1, x86_64: "Amazon Corretto 11"
5# ^
6# |
7# VERSION
8export JAVA_HOME=`/usr/libexec/java_home -v [VERSION]`
1/usr/libexec/java_home -V
2export JAVA_HOME=`/usr/libexec/java_home -v 1.6.0_65-b14-462` //java 8