Set Up JAVA_HOME in Linux

I recently upgraded to Linux Mint 17 “Qiana” and since I did a clean install had to re-configure everything, but anyways don’t want to bore you with my stories. Here is how you set up JAVA_HOME in Linux Mint or any other Linux distribution.

Modify your profile file located under your home directory using vi or your editor of preference; in the case of Linux Mint is ~/.bashrc

esilva@esilva-N56VJ ~ $ vi ~/.bashrc

Add the following lines

# Java Home
export PATH=${PATH}:$JAVA_HOME/bin

(in my case I installed Java 8, thus java-8-oracle, but if you have java 7 or any other version, just change it to that version)

You can make sure by echoing $JAVA_HOME

esilva@esilva-N56VJ ~ $ echo $JAVA_HOME

Restart your computer and you should be set and ready to go!!!

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed.