How to install oracle jdk on linux

WBOY
Release: 2022-05-10 16:04:41
Original
2723 people have browsed it

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
Copy after login
Copy after login

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

sudo apt-get purge openjdk-\*
Copy after login

How to install oracle jdk on linux

Add resources:

sudo add-apt-repository ppa:webupd8team/java
Copy after login

How to install oracle jdk on linux

Update source:

sudo apt-get update
Copy after login

How to install oracle jdk on linux

2. Install Oracle JDK:

sudo apt-get install oracle-java8-installer
Copy after login

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
Copy after login
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template