Home>Article>Operation and Maintenance> How to install oracle jdk on linux
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.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
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-\*
Add resources:
sudo add-apt-repository ppa:webupd8team/java
Update source:
sudo apt-get update
2. Install Oracle JDK:
sudo apt-get install oracle-java8-installer
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## 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!