Today: Girls and Reality TV, Stars' Awkward Photos, Hollywood Cradle Robbers

How to set JAVA_HOME environment variable in Ubuntu

I am actually creating this blog entry as a bookmark for myself, but since I know that I never remember how to do it, others might benefit as well!

One way that you can set your JAVA_HOME variable and add to your PATH, is be doing the folowing.  As 'sudo' open up /etc/bash.bashrc and add the following to the end of the file.  NOTE: Set the java path to whatever the actual path is on your environment if it does not match /usr/lib/jvm/java

 

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

 

When you reboot, try running the following:

 

$ echo $JAVA_HOME
/usr/lib/jvm/java
echo $PATH
[probably lots of paths]:/usr/lib/jvm/java/bin

More on Zimbio:
Get the Look - Dress Like Steve Jobs
Get the Look - Dress Like Steve Jobs
Steve Jobs did not get where he is today by looking like a slouch. Instead of spreading himself thin, he found one look and stuck with it. Check it out.

 

Advertisements
Comments
Zimbio Entertainment
Copyright © 2012 - Zimbio, Inc. Some rights reserved.
Share
. . .
Follow
. . .