If you do not want to use the OpenJDK java software on your Ubuntu system, you can install Oracle Java, also known as Sun Java using the following commands in a terminal window:
$ sudo add-apt-repository ppa:webupd8team/java <enter>
$ sudo apt-get update <enter>
$ sudo apt-get install oracle-java7-installer <enter>
After the installation is complete, you can verify that the Java plugin has been installed by starting your Firefox web browser and typing about:plugins in the URL box.