Adding Oracle JRE and JDK to Ubuntu 11.10
Problem: Need to install Oracle JRE and JDK and NOT Open JDK/JRE on Debian-style distros.
After thumbing through countless pages I finally found the answer!
sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
The code above will add java to your repository (found in /etc/apt/sources.list.d/) and store it on your file system.
We need to update aptitude so it recognizes the new repository location, so we issue the sudo apt-get update command
Finally, we need to actually install the desired software. Since ubuntu officially doesn't have the repository automatically listed we needed to add a new location. When we issue the apt-get install packagename command aptitude will query the list of known repository locations that come pre-bundled with Ubuntu or any Debian-style distro (Ubuntu included).
For those that are really interested, we can quickly cat the .list file and we will see the following:
deb http://ppa.launchpad.net/ferramroberto/java/ubuntu oneiric main deb-src http://ppa.launchpad.net/ferramroberto/java/ubuntu oneiric main
The addition of the new repository location creates the file in the /etc/apt/sources.list.d/ as mentioned previously.