install java centos 8

‮th‬tps://www.lautturi.com
install java centos 8

To install Java on CentOS 8, you can follow these steps:

  1. Add the Oracle Java 11 repository to your system:
sudo yum install -y yum-utils
sudo yum-config-manager --enable ol7_developer_EPEL
sudo yum-config-manager --enable ol7_optional_latest
  1. Install Java 11:
sudo yum install java-11-oracle-devel
  1. Set the default Java version to Java 11:
sudo alternatives --set java /usr/java/latest/bin/java
  1. Verify that Java 11 is installed and set as the default:
java -version

Note that these steps will install the Oracle version of Java 11. If you prefer to install the OpenJDK version of Java 11, you can use the following command instead of step 2:

sudo yum install java-11-openjdk-devel

For more information on installing Java on CentOS 8, you can refer to the Oracle documentation or the OpenJDK documentation.

Created Time:2017-11-01 22:29:52  Author:lautturi