- Red Hat middleware products
- Red Hat Enterprise Linux (RHEL)
- To run JBoss product, I need to set the
JAVA_HOMEenvironment variable, how to set it?
- How do I set the
JAVA_HOME is needed to run the Java-related applications, else the results may vary. To manually set up the
JAVA_HOME environment variable follow the steps:
- Determine the correct value for
JAVA_HOME. It should point to the directory containing a
- As the user who will use OpenJDK or any JDK vendor, open the shell configuration file. For the bash shell, this file is
- At the bottom of the file, type the following line, replacing the hypothetical path with the actual path to use on the operating system:
- Save the file and reload the shell configuration, i.e,
echo $JAVA_HOMEcommand-line must return the complete path directory to
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.