How to set JAVA_HOME in Ubuntu

JavaI can never remember this, so for mainly for my reference and anybody else who may Google this.

  • Get Java via the Synaptic Update Manager
  • sudo vi /etc/bash.bashrc and add the following to the end of the file:
    JAVA_HOME=/usr/lib/jvm/java-6-sun
    export JAVA_HOME
  • Close your command window and reopen
  • echo $JAVA_HOME to confirm it is set
Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s