Home > Java > javaTutorial > How to install the jdk command in java under linux system

How to install the jdk command in java under linux system

王林
Release: 2023-05-11 21:22:04
forward
1058 people have browsed it

1. Installation steps

1. Install dependency packages:

sudo apt-get install python-software-properties
Copy after login

2. Add warehouse source:

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

3. Update the software package list:

sudo apt-get update
Copy after login

4. Install java JDK:

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

5. Check the java version to see if the installation is successful:

java -version
Copy after login

2. Oracle JDK version introduction

Oracle JDK is more stable than OpenJDK. The code of OpenJDK and Oracle JDK is almost the same, but Oracle JDK has more classes and some bug fixes. So, if you want to develop enterprise/commercial software, I recommend you to choose Oracle JDK as it is thoroughly tested and stable. In some cases, some people mentioned that they may have encountered many application crashes when using OpenJDK, but simply switching to Oracle JDK can solve the problem.

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

Related labels:
source:yisu.com
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