Welcome to JavaRanch
There is a better way to install Java on a Debian-based Linux installation, which includes Ubuntu: Jesper Young told us
here to use
sudo apt-get install sun-java6-jdk which sets the PATH automatically. There is a similar instruction to update it.
An rpm-based Linux installation (eg Suse, Fedora) can use a similar instruction with the rpm tool.
The instructions to use export PATH in the .bashrc file should work for any "bash" terminal; Ubuntu and OpenSUSE and Fedora usually use "bash". You can probably find out which terminal you are using by giving a nonsense instruction to the terminal
campbell@linux-747u:~> which bash
/bin/bash
campbell@linux-747u:~> oeirhglkcjxnvgiud
bash: oeirhglkcjxnvgiud: command not found
campbell@linux-747u:~>
And the name of the shell program appears as part of the error message