![]() ![]() 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. The output may vary depending upon the package and the version you chose to be the default Java version. 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. Once the page loads, click on Downloads as marked in the. If your system has multiple Java versions, the above command will list all Java versions like below. But you can download Oracle JDK 11 from the official website of Oracle and install it on CentOS 7. Use the alternatives command to set the default java version. To install Oracle JDK to a custom directory, use rpm -ivh –prefix=// rpmfile command. In order to install java 11: sudo amazon-linux-extras install java-openjdk11 For java 8 you can try: sudo yum install java-1.8. By default, Java JDK is installed in /usr/java/ directory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |