How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

First, let's talk about Java. Oracle-owned Java is an object-oriented programming language. It is an assembly language, with its own rules, and widely disseminated in the educational and professional level.

It consists of three basic components: JDK, JRE and JVM. JDK is the Java Development Kit, which includes start using the Java compiler and libraries needed to create applications. Java Runtime Environment (JRE) is an engine used to run these applications. Finally, Java Virtual Machine (JVM) serve as an intermediate layer between the operating system and JRE run Java applications.

A, Java and Linux

Java and Linux compatible, which means you can build and run applications from your favorite release. The problem is that the official repository-based version of OpenJDK. Simply put, this means that we will not use it to create business applications, except that it is outside the community version has its advantages and disadvantages.

That's why if you want to develop third-party applications but no licensing issues, you should install Oracle Java.

Second, through the PPA to install Oracle Java

As mentioned earlier, if you are a developer, you must install Oracle Java. Luckily, with the Java Uprising PPA, it can be done in a very simple way.

The repository can be executed automatically process the Oracle Java download, install and configure .deb package. Obviously, it is downloaded from the Oracle website, to configure and allows us to set the default versions.

1, for Ubuntu 18.04 and 18.10

First, you need to update the system.

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

After installation is complete, the next step will be to add Java uprising repository.

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

1.- Add PPA
 
Finally, you can install Oracle Java. Then, you will see the license terms.

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

2.- License Agreement

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

Depending on your Internet connection, it may take some time.

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

2, the Oracle Java 13 set to the default value

The PPA comes with a very useful software package in the form of version tool for Oracle Java 13 set as the default Java version of the system.

If you use Ubuntu, then install oracle-java13-installer software package has oracle-java13-set-default package has been installed as a recommended package, in addition to verify the installation, but do not need to do anything else.

java --version

To Oracle JDK13 set as the default, install the oracle-java13-set-default package, run the following command:

sudo apt y install oracle-java13-set-default

On the other hand, if you want to install Java 13, instead of the default Java. Therefore, you must delete the oracle-java13-set-default package.

sudo apt remove oracle-java13-set-default

It's that simple.

or

3, using the deb package to install Java 13

You can also download Java SE Development Kit 13 Debian packages, from the oracle website address: https: //www.oracle.com/java/technologies/javase-jdk13-downloads.html

Download the Ubuntu terminal:

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

Then use dpkg command to install the package, run the following command:

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

We can wait for the command is finished. At this point, install Java JDK 13 is completed.

4, alternate download program

Install Oracle Java 13, when the network does not allow the server to download from the Oracle JDK.tar.gz file, or download the installation file is relatively slow in the case, you can use a web browser or other computer to download Oracle Java 13 installation files, and then you want to install Oracle the Java computer 13 to create a / var / cache / oracle-jdk13-installer folders and files in the installation jDK13 folder. After that, using the above steps Oracle-java13-installer command to install, the installer will get a local copy .tar.gz archive, and will not try to download it from Oracle.

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

5, using the oracle-java13-installer automatically accept the license

echo oracle-java13-installer shared/accepted-oracle-license-v1-2 select true | sudo /usr/bin/debconf-set-selections
或者
echo oracle-java13-installer shared/accepted-oracle-licence-v1-2 boolean true | sudo /usr/bin/debconf-set-selections

6, version checking:

How to install Oracle Java 13 on Ubuntu 18.04 / 18.10 and Debian 9

Third, the summary

On Ubuntu and Debian-specific version of the Java installation is very simple, but if you are interested in learning this programming language, you must do so.

Tell us about your experience, do you use Java? Are you a Java developer? Tell us in the comments.

Guess you like

Origin www.linuxidc.com/Linux/2020-02/162380.htm