Home >Operation and Maintenance >Linux Operation and Maintenance >How to install oracle jdk on linux

How to install oracle jdk on linux

WBOY
WBOYOriginal
2022-05-10 15:45:572753browse

Method: 1. Use the "java -version" command to check whether jdk is installed. If it is installed, use "apt-get purge openjdk-\*" to uninstall it; 2. Use "apt-get install oracle -java8-installer" to install it.

How to install oracle jdk on linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to install oracle jdk on linux

1. First execute the following command to see whether OpenJDK is installed. If it has been installed, the version information will be displayed.

java -version

If OpenJDK is installed, you can uninstall it all as follows:

sudo apt-get purge openjdk-\*

How to install oracle jdk on linux

Add resources:

sudo add-apt-repository ppa:webupd8team/java

How to install oracle jdk on linux

Update source:

sudo apt-get update

How to install oracle jdk on linux

2. Install Oracle JDK:

sudo apt-get install oracle-java8-installer

How to install oracle jdk on linux

The installation process depends on the personal network environment It depends, it needs to download 175M, please wait patiently.

After the installation is complete, you can view the java version information:

java -version

How to install oracle jdk on linux

How to install oracle jdk on linux

How to install oracle jdk on linux

## Test whether the configuration can be run. Here, HelloWorld.java is used for testing.

Related recommendations: "

Linux Video Tutorial"

The above is the detailed content of How to install oracle jdk on linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn