Set variables based on the Java location and version. Java applications often require JAVA environment variables to be set in the system.Ĭreate a new file under /etc/profile.d directory. Install java 8 openjdk how to#The Installing and using OpenJDK 8 guide provides an overview of this product and explains how to install the software and start using it. The output may vary depending upon the package and the version you chose to be the default Java version. Abstract OpenJDK is a Red Hat offering on the Red Hat Enterprise Linux platform. OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9-LTS, mixed mode, sharing) OpenJDK Runtime Environment 18.9 (build 11.0.11+9-LTS) Verify Java VersionĬheck the java version using the following command. There are 3 programs which provide 'java'.ġ java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.11.0.9-2.el8_4.x86_64/bin/java)Ģ java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.8_4.x86_64/jre/bin/java)Įnter to keep the current selection, or type selection number: 1Įnter the number below the selection column to set the default Java version. If your system has multiple Java versions, the above command will list all Java versions like below. Use the alternatives command to set the default java version. To install Oracle JDK to a custom directory, use rpm -ivh –prefix=// rpmfile command. sudo apt purge -y openjdk-11-jre-headless sudo apt purge -y openjdk-8-jre-headless sudo apt purge -y default-jdk then I run command to set java 8 as default: sudo update-alternatives -config java and the version is correctly reflect. OpenJDK is an open source Java Development Kit provided by Oracle. By default, Java JDK is installed in /usr/java/ directory. To install Deprecated OpenJDK 8, run the following command from the command line or.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |