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!!!

Esau Silva
Software Engineer at Region One ESC
Full Stack Software Engineer working with Microsoft technologies, ReactJS is awesome and avid Brazilian Jiu-Jitsu practitioner
Spread the love

One thought on “Set Up JAVA_HOME in Linux

  1. […] was like, “what the heck!” since I already had changed my JAVA_HOME environment […]

Leave a Reply

Your email address will not be published. Required fields are marked *