How to configure JAVA_HOME on Ubuntu 10.04

I found this good article for setting the JAVA_HOME variable on Ubuntu Linux:

I have now used those instructions for my Ubuntu 10.04 Netbook Remix and a Ubuntu 10.04 Server LTS. Both works well.

Edit the startup bash file by opening up a terminal and typing:
sudo vi /etc/bash.bashrc

At the vi editor press the [i] key and add the following lines
export JAVA_HOME
export PATH

At the vi editor press the [Esc] key and type :wq then press the [Enter] key

Now restart the server by typing the following at the terminal:
shutdown -r now

After the computer has restarted, open up a terminal and check JAVA_HOME by typing:

I am using the JAVA_HOME path for running the Palo ETL program for extracting and loading economic data. A blog post for another time.