Optional: Set the JAVA_HOME property for your environment. Liberty runs
in a Java Runtime Environment (JRE). It does not share the JDK or JRE
that WebSphere® Application Server traditional uses.You can specify the JDK or JRE location using the JAVA_HOME property in
the server.env file, as described in Customizing the Liberty environment.
When you set the JAVA_HOME property in the server.env
file, Liberty uses the same Java runtime location regardless
of the user profile that Liberty server runs under.
On the IBM i platform, setting the
JAVA_HOME property as a system-level environment variable is not recommended.
The IBM i platform is a shared environment, and changing
system-level environment variables might affect other applications.

On Linux or UNIX systems, you can instead set
JAVA_HOME in the user
.bashrc file, or append the JDK or JRE path to the
PATH
environment variable. On Windows systems, you can instead
set
JAVA_HOME as a system environment variable, or append the JDK or JRE path
to the
PATH system variable. For example, on Windows systems you can use the following commands to set the
JAVA_HOME property, and to add the Java
/bin directory to the
path:
set JAVA_HOME=C:\Progra~1\Java\JDK16
set PATH=%JAVA_HOME%\bin;%PATH%
Note: Support for using Java SE 6 with WebSphere Liberty ends in September 2017. After
the end of support, the Liberty kernel will be recompiled and can no longer run with Java SE 6. If
you continue to use Java SE 6 on earlier fix packs after the end of support date, you could expose
your environment to security risks.
Java SE 8 is the recommended Java SDK because it provides the
latest features and security updates. You can install it by installing the IBM SDK, Java Technology
Edition, Version 8 package to the package group that contains WebSphere Liberty.
Note: The Liberty runtime environment searches for the java command in this
order: JAVA_HOME property, JRE_HOME property, and system
PATH property.
For more information about supported Java environments, and where to get them, see Minimum supported Java levels.