Guide to install Java SE 8
Windows
Install JDK and JRE
Download the corresponding installer from oracle.
Execute Installer to install. Quite easy. Note that the installer will install both the JDK and the corresponding JRE.
Set Path
- Update the environment variables
PATH
. For me I just need to addC:\Program Files\Java\jdk-1.8\bin
to my User variable.
Ubuntu
Install JDK and JRE
JDK
Download the corresponding file from oracle. For Ubuntu users, please download the “Compressed Archive” File.
Uncompress the
.tar.gz
using commandtar zxvf your-name.tar.gz
. Then move all the file to a new installation directory if you like. For me, it’s/usr/lib/jvm/jdk-1.8-oracle-x64
.
JRE
Download the corresponding “Compressed Archive” file from oracle.
Uncompress the file and move it to the installation directory. For me it’s
/usr/lib/jvm/jre-1.8-oracle-x64
Note that x64
can be replaced to your architecture.
Set Path
- Add this line to your
~/.bashrc
(Note to change the directory to yours)export PATH=/usr/lib/jvm/JDK-directory/bin:$PATH
- Reload using
source ~/.bashrc