OpenJDK 8安装

As a workaround, you can install OpenJDK 8 from a PPA repository:

1. Open terminal from the Dash or by pressing Ctrl+Alt+T. When it opens, run the command below to add PPA:

Type in user password when it asks and hit Enter to continue.

2. After that, update system package cache and install OpenJDK 8:

3. If you have more than one Java versions installed on your system. Run below command set the default Java:

Type in a number to select a Java version.

install-openjdk

And set default Java Compiler by running:

4. Finally check out current Java version by running:

It outputs something like this: