Java Environment Setup

Set Java Home:
Add this line to /etc/bash.bashrc or /etc/profile for all user, ~/.bashrc for particular user

export JAVA_HOME=/usr/java
export PATH=$JAVA_HOME/bin:$PATH

Java environment will need recognized by the shell ($PATH variable and $JAVA_HOME). This can be done by sourcing /etc/bash.bashrc or /etc/profile or ~/.bashrc

source /etc/bash.bashrc
or
source /etc/profile
or
source ~/.bashrc
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License