在linux mint 上安装 Oracle JDK 的方法

1. Open up the Terminal (Alt + F2 > Terminal).

2. Remove OpenJDK installation.

3. Download Oracle JDK from here. You are looking for a linux version with tar.gz extension. Also choose the right version from 32-bit (x86)  and 64bit (x64) one.

4. Change directory into one with downloaded tarball. In my case $HOME/Downloads.

5. Extract tarball. Replace with a name of dowloaded file. (just press Tab and it will be autocompleted.)

6. As a root create a folder in /opt where jdk will be stored.

7. Move extracted folder to /opt/java. In my case, version number was 1.7.0_25.

8. Make JDK system default.

9. Test installed java version.

java version “1.7.0_25” Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)