Firstly, trust me with this, because you can look up how to install this on Google and it will show the same info I am teaching you now.
Now, on with the tutorial.
First, open XTerm on Lubuntu & Kubuntu , Terminal Emulator on Xubuntu, and Terminal on Ubuntu (Main flavor), and type in what's below:
Code:sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get oracle-java8-installer
Then, a text-only UI will appear with a Terms and Conditions window and after that a Yes/No window saying for you to agree to the Oracle Java Binary Agreement or something along those lines. Select Yes and Java 8 will continue with the install. After about 6 minutes (Since that's how long it took me to install this) the install will be finished and you can do whatever you need to with the Java Development Kit and/or Java Runtime Environment (Or JRE for short).