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

How to install the jdk command in java under linux system

王林
王林forward
2023-05-11 21:22:04940browse

1. Installation steps

1. Install dependency packages:

sudo apt-get install python-software-properties

2. Add warehouse source:

sudo add-apt-repository ppa:webupd8team/java

3. Update the software package list:

sudo apt-get update

4. Install java JDK:

sudo apt-get install oracle-java8-installer

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

java -version

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!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete