![]() ![]() Then, activate the changes with the following command: source /etc/profile ![]() Save and close the file when you are finished. You can set the JAVA_HOME environment variable for OpenJDK 11 by editing the file /etc/profile: nano /etc/profileĪdd the following line at the end of the file: JAVA_HOME="/usr/lib/jvm/java-11-openjdk-11.0.5.10-2.el8_1.x86_64/" You can use the JAVA_HOME environment variable to define the Java installation path. In some Java-based applications, you will need to define the installation location of Java to specify which Java version you want to use to run the application. Step 5 – Setup JAVA_HOME Environment Variable You should see that OpenJDK 11 is the default Java version on your system. Now, verify the default Java version with the following command: java -version Type 1 and press Enter to switch the Java version from OpenJDK 8 to OpenJDK 11. In the following output, you should see that OpenJDK 8 is the default version on your system. You can switch between multiple Java versions using the following command: alternatives -config java You can install it with the following command: dnf install java-1.8.0-openjdk -yĪt this point, you have two different versions of Java installed on your system. Once installed, verify the installed Java version with the following command: java -versionīy default, OpenJDK 8 is available in the CentOS 8 default repository. You can install it by running the following command: dnf install java-11-openjdk -y dnf update -y Step 2 – Install OpenJDK 11īy default, OpenJDK 11 is available in the CentOS 8 default repository. Once you are logged into your CentOS 8 server, run the following command to update your base system with the latest available packages. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page. Create a new server, choosing CentOS 8 as the operating system with at least 1GB RAM. Step 1 – Create Atlantic.Net Cloud Serverįirst, log in to your Atlantic.Net Cloud Server. A root password configured on your server.A fresh CentOS 8 VPS on the Atlantic.Net Cloud Platform.In this tutorial, we will show you how to install OpenJDK 8, OpenJDK 11 and Oracle Java JDK 14 on CentOS 8. Oracle JDK is a paid and permits only non-commercial use of the software.OpenJDK is the free and open-source implementation of the Java Platform.There are two different implementations of Java, OpenJDK and Oracle JDK: Java JDK comes with a set of tools for developing and testing applications written in the Java programming language these tools include JRE, Java, Javac (Compiler) and Jar (Archiver). Java JDK is a free and open-source software development kit used for building applications, applets, and components using the Java programming language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |