- sudo apt-get install software-properties-common
When prompted to confirm the installation, type
y
for yes.
To ensure that we get the correct source line on Debian, we’ll need to run the following command that also modifies the line:
- sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
Once we do that we’ll need to update:
- sudo apt-get update
Now we’ll go through the installation process of different versions of Java. You can decide which versions you would like to install, and can choose to install one or several. Because it’s the latest stable release, Oracle JDK 8 is the recommended version at the time of writing.
Oracle JDK 8
Oracle JDK 8 is the latest stable version of Java at time of writing. You can install it using the following command:
- sudo apt-get install oracle-java8-installer
评论
发表评论