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.

[topads][/topads]

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

vi ~/.bashrc

Add the following lines

# Java Home
JAVA_HOME=/usr/lib/jvm/java-8-oracle
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

$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle

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

[bottomads][/bottomads]

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 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.