Setup environment
operating system: ubuntu 14.04 64bit
Download jdk
Download the latest version of jdk from the official website.
Unzip jdk
Usually, we will create a new folder to hold the unzipped jdk file.
1 | sudo mkdir /usr/lib/jvm |
Then we unzip jdk we download and copy them to jvm folder
1 | sudo tar zxvf jdk-8u60-linux-x64.tar.gz -C /usr/lib/jvm |
Next, we need to configure environment variables.
1 | //open the user environment variable file |
Then we can make test.
1 | java -version |
If succeed, the results will be look like as follows:
1 | java version "1.8.0_60" |