JAVA_HOME variable for Liberty collective members and
All Liberty collective members
must have a Java™ Runtime Environment (JRE) installed that
meets the minimum requirements of the Liberty
server. After a JRE is installed on the host computer, you can set the
variable so that the Liberty operation can
locate the JRE.
About this task
- Using Installation Manager, select the Liberty product first and then select the IBM SDK for Liberty. Use Installation Manager to install the Liberty product and software development kit (SDK). The IBM SDK includes the needed support for Liberty products and SSL and offers a Java client, JConsole. For more information about installing the IBM SDK, see the following topics.
- Go to http://www.ibm.com/developerworks/java/jdk/index.html on the developerWorks website and download an IBM Java development kit (JDK) for your operating system. The developerWorks website does not have a JRE for all operating systems. For example, for Windows operating systems, get the JDK from Eclipse.
You can set the
JAVA_HOME variable in operating system settings or at a command
line. Setting set the
JAVA_HOME variable enables remote operations to locate the
JAVA_HOMEon a Windows system, perform the following actions.
Note: Rather than change the operating system settings, you can set
On the Control panel:
- Click System.
- Click Advanced system settings.
- Click the Environment Variables button.
- Click the New button in the system-variables section.
JAVA_HOMEvariable name and specify a path to the jre directory. For example:
Some collective controller commands require that the path to the Java installation jre\bin directory is available in the System path, so also add a path to the jre\bin directory.
- Save the changes. You might need to restart the computer for the changes to take effect.
To verify the changes, at a command line enter
set JAVA_HOME. The command displays the
JAVA_HOMEat a command line by entering
set JAVA_HOME=path_to_jre. A limitation is that the
JAVA_HOMEsetting applies to commands entered in the same command window only.
- On the Control panel:
If you are running bash shell, you can add the
JAVA_HOMEenvironment variable to the .bashrc file in the user's home directory.
Some collective controller commands require that the path to the Java installation jre/bin directory is available in the .bashrc file, so set a path to jre/bin in the .bashrc file.