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:
    export JAVA_HOME
  • Close your command window and reopen
  • echo $JAVA_HOME to confirm it is set