{"id":15550,"date":"2025-11-03T06:45:00","date_gmt":"2025-11-03T06:45:00","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=15550"},"modified":"2025-11-03T10:41:50","modified_gmt":"2025-11-03T10:41:50","slug":"how-to-install-java-on-centos-10","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/","title":{"rendered":"How to Install Java on CentOS 10 : Ultimate Guide"},"content":{"rendered":"\n<p>Installing Java in CentOS 10 will be crucial for system administrators and developers who wish to run Java applications, frameworks, or servers such as Apache Tomcat, Jenkins, or Hadoop. Java is one of the most popular programming languages and runtimes in the world. Installing and configuring the correct Java version on CentOS 10 is essential for stability, performance, and compatibility, whether you are setting up a software development environment or deploying an enterprise-grade application.<\/p>\n\n\n\n<p>This guide will cover the steps to installing Java on CentOS 10, including OpenJDK and Oracle Java. We&#8217;ll also discuss how to set up JAVA_HOME.<\/p>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#post-15550-_uo64syvgn197\">How to Install Java on CentOS 10<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#Method-1:-Install-OpenJDK-(Recommended)\">Method 1: Install OpenJDK (Recommended)<\/a><\/li>\n\n\n\n<li><a href=\"#Method-2:-Install-Oracle-Java-(Optional)\">Method 2: Install Oracle Java (Optional)<\/a><\/li>\n\n\n\n<li><a href=\"#Method-3:-Install-Specific-Java-Version-(Manual-Selection)\">Method 3: Install Specific Java Version (Manual Selection)<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#Setting-JAVA_HOME-Environment-Variable\">Setting JAVA_HOME Environment Variable<\/a><\/li>\n\n\n\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><a id=\"post-15550-_uo64syvgn197\"><\/a>How to Install Java on CentOS 10<\/h2>\n\n\n\n<p>It&#8217;s easy to install Java on CentOS 10, whether you select OpenJDK, for flexibility and open-source support, or Oracle Java, for enterprise-grade support. This guide covers all installation methods, from setting up environment variables to using yum repositories. These steps will allow you to quickly configure Java on CentOS 10 for software deployment, application development, or server management.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_isxraxp77xv6\"><\/a>Prerequisites<\/h3>\n\n\n\n<p>Install Java only after you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CentOS 10 is installed and operational.<\/li>\n\n\n\n<li>You are currently logged in as the sudo user.<\/li>\n\n\n\n<li>The latest packages are installed on your system. <\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-1:-Install-OpenJDK-(Recommended)\"><a id=\"post-15550-_5k7nvt9c4g2l\"><\/a>Method 1: Install OpenJDK (Recommended)<\/h2>\n\n\n\n<p>OpenJDK, the open-source Java implementation, is available in CentOS&#8217;s repositories. It is ideal for the majority of use cases, such as production environments. To install Java on CentOS 10, follow below steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_sj16ni466s5n\"><\/a>Step 1: Check Available Java Versions<\/h3>\n\n\n\n<p>To list all OpenJDK versions available, run the following command:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo yum search openjdk<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"971\" height=\"470\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-1.png\" alt=\"\" class=\"wp-image-15551\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-1.png 971w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-1-300x145.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-1-768x372.png 768w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This command will list the versions of OpenJDK available in your CentOS 10 repository. You can then choose the one you want.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_1bs4vfout72\"><\/a>Step 2: Install Java (OpenJDK 21 Example)<\/h3>\n\n\n\n<p>Install OpenJDK 21, which is the most popular and stable version:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo yum install java-21-openjdk-devel<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"959\" height=\"493\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-2.png\" alt=\"\" class=\"wp-image-15552\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-2.png 959w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-2-300x154.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-2-768x395.png 768w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The -devel packages include the Java Runtime Environment and the Java Development Kit, which are required to compile and run Java applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_e0luzdyjmk07\"><\/a>Step 3: Verify Installation<\/h3>\n\n\n\n<p>Check your Java version after installation:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>java -version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"970\" height=\"186\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-3.png\" alt=\"\" class=\"wp-image-15553\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-3.png 970w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-3-300x58.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-3-768x147.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Java has been successfully installed on CentOS 10!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-2:-Install-Oracle-Java-(Optional)\"><a id=\"post-15550-_2is1z3q7ywc7\"><\/a>Method 2: Install Oracle Java (Optional)<\/h2>\n\n\n\n<p>Oracle Java is the Oracle proprietary distribution. Oracle Java is often needed for enterprise software that depends specifically on Oracle&#8217;s version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_t58b2kub65lg\"><\/a>Step 1: Enable Oracle Yum Repository<\/h3>\n\n\n\n<p>Install the Oracle Java Repository package.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>wget https:\/\/download.oracle.com\/java\/21\/latest\/jdk-21_linux-x64_bin.rpm<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"393\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-4.png\" alt=\"\" class=\"wp-image-15554\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-4.png 979w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-4-300x120.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-4-768x308.png 768w\" sizes=\"(max-width: 979px) 100vw, 979px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>This will add Oracle&#8217;s official Java repositories to your CentOS 10 systems, allowing you to install Oracle JDK Versions easily.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_2vgkmlws04sg\"><\/a>Step 2: Install Oracle Java<\/h3>\n\n\n\n<p>Install the latest Java version, for example, Java 21:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo rpm -Uvh jdk-21_linux-x64_bin.rpm<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"964\" height=\"230\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-5.png\" alt=\"\" class=\"wp-image-15555\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-5.png 964w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-5-300x72.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-5-768x183.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-5-960x230.png 960w\" sizes=\"(max-width: 964px) 100vw, 964px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Install the Oracle JDK, which includes the runtime as well as the development tools.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_2b7ijdhiqyg1\"><\/a>Step 3: Verify Installation<\/h3>\n\n\n\n<p>Check the version installed:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>java -version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"157\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-6.png\" alt=\"\" class=\"wp-image-15556\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-6.png 972w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-6-300x48.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-6-768x124.png 768w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Now that you have installed the latest Oracle Java on your CentOS 10 System, you can start using it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-3:-Install-Specific-Java-Version-(Manual-Selection)\"><a id=\"post-15550-_so2hg1tnx6gx\"><\/a>Method 3: Install Specific Java Version (Manual Selection)<\/h2>\n\n\n\n<p>You can switch manually between Java versions if you have more than one installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_j1wpnnms4cd8\"><\/a>Step 1: List Installed Java Versions<\/h3>\n\n\n\n<p>List all Java versions installed.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo alternatives &#8211;config java<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"964\" height=\"225\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-7.png\" alt=\"\" class=\"wp-image-15557\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-7.png 964w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-7-300x70.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-7-768x179.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-7-960x225.png 960w\" sizes=\"(max-width: 964px) 100vw, 964px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The list below shows all Java versions installed. The * represents the current default Java version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_8foc4gvd91r0\"><\/a>Step 2: Switch Default Java Version<\/h3>\n\n\n\n<p>Enter the version number you want.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo alternatives &#8211;config java<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"290\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-8.png\" alt=\"\" class=\"wp-image-15558\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-8.png 966w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-8-300x90.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-8-768x231.png 768w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Changes the default Java version for all applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Setting-JAVA_HOME-Environment-Variable\"><a id=\"post-15550-_4jqikvr290fa\"><\/a>Setting JAVA_HOME Environment Variable<\/h2>\n\n\n\n<p>Many Java applications use the JAVA_HOME variable to find your Java installation path.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_tzylaic8m4o4\"><\/a>Step 1: Find Java Installation Path<\/h3>\n\n\n\n<p>First, find the installation path:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo update-alternatives &#8211;display java<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"343\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-9.png\" alt=\"\" class=\"wp-image-15559\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-9.png 969w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-9-300x106.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-9-768x272.png 768w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_olatz44hagm9\"><\/a>Step 2: Set JAVA_HOME Variable<\/h3>\n\n\n\n<p>Open the environment configuration file:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo nano \/etc\/profile.d\/java.sh<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Add the following line (replace path with your own version):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>export JAVA_HOME=\/usr\/lib\/jvm\/java-21.0.9-oracle-x64\/bin\/java<\/p>\n<p>export PATH=$PATH:$JAVA_HOME\/bin<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"393\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-10.png\" alt=\"\" class=\"wp-image-15560\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-10.png 973w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-10-300x121.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-10-768x310.png 768w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Apply changes after saving and exiting:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>source \/etc\/profile.d\/java.sh<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"971\" height=\"96\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-11.png\" alt=\"\" class=\"wp-image-15561\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-11.png 971w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-11-300x30.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-11-768x76.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-11-960x96.png 960w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15550-_85r2e26c1v6\"><\/a>Step 3: Verify JAVA_HOME<\/h3>\n\n\n\n<p>Check the variable:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>echo $JAVA_HOME<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"971\" height=\"117\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-12.png\" alt=\"\" class=\"wp-image-15562\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-12.png 971w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-12-300x36.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-12-768x93.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/word-image-15550-12-960x117.png 960w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>By setting JAVA_HOME, all Java applications and tools (such as Maven or Gradle) can automatically locate your Java installation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\"><a id=\"post-15550-_3ktfljyaemjq\"><\/a>Conclusion<\/h2>\n\n\n\n<p>To install Java on CentOS 10, first update your system using sudo dnf update -y to ensure all packages are up to date. Then check available Java versions with sudo dnf search openjdk and install your preferred version, for example, sudo dnf install java-21-openjdk-devel -y to install OpenJDK 21. Once the installation completes, verify it using java -version to confirm that Java is installed correctly.<\/p>\n\n\n\n<p>You can set the default using sudo alternatives -config java if multiple Java versions are present. Finally, configure the JAVA_HOME environment variable by editing \/etc\/profile.d\/java.sh and adding export JAVA_HOME=\/usr\/lib\/jvm\/java-21-openjdk followed by export PATH=$PATH:$JAVA_HOME\/bin, then reload it using source \/etc\/profile.d\/java.sh. Your Java installation on CentOS 10 is now complete and ready to use.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Installing Java in CentOS 10 will be crucial for system administrators and developers who wish to run Java applications, frameworks, or servers such as Apache Tomcat, Jenkins, or Hadoop. Java is one of the most popular programming languages and runtimes in the world. Installing and configuring the correct Java version on CentOS 10 is essential [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":15566,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[958,257,889],"class_list":["post-15550","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-centos-10","tag-java","tag-java-applications"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Java on CentOS 10 : Ultimate Guide<\/title>\n<meta name=\"description\" content=\"This guide will cover the steps to installing Java on CentOS 10, including OpenJDK and Oracle Java. Learn more!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Java on CentOS 10 : Ultimate Guide\" \/>\n<meta property=\"og:description\" content=\"This guide will cover the steps to installing Java on CentOS 10, including OpenJDK and Oracle Java. Learn more!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-03T06:45:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-03T10:41:50+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Install Java on CentOS 10 : Ultimate Guide\",\"datePublished\":\"2025-11-03T06:45:00+00:00\",\"dateModified\":\"2025-11-03T10:41:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/\"},\"wordCount\":820,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg\",\"keywords\":[\"CentOS 10\",\"Java\",\"Java Applications\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/\",\"name\":\"How to Install Java on CentOS 10 : Ultimate Guide\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg\",\"datePublished\":\"2025-11-03T06:45:00+00:00\",\"dateModified\":\"2025-11-03T10:41:50+00:00\",\"description\":\"This guide will cover the steps to installing Java on CentOS 10, including OpenJDK and Oracle Java. Learn more!\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg\",\"width\":1020,\"height\":600,\"caption\":\"Install Java on CentOS 10\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Java on CentOS 10 : Ultimate Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Java on CentOS 10 : Ultimate Guide","description":"This guide will cover the steps to installing Java on CentOS 10, including OpenJDK and Oracle Java. Learn more!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Java on CentOS 10 : Ultimate Guide","og_description":"This guide will cover the steps to installing Java on CentOS 10, including OpenJDK and Oracle Java. Learn more!","og_url":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/","og_site_name":"Greenwebpage Community","article_published_time":"2025-11-03T06:45:00+00:00","article_modified_time":"2025-11-03T10:41:50+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Install Java on CentOS 10 : Ultimate Guide","datePublished":"2025-11-03T06:45:00+00:00","dateModified":"2025-11-03T10:41:50+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/"},"wordCount":820,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg","keywords":["CentOS 10","Java","Java Applications"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/","url":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/","name":"How to Install Java on CentOS 10 : Ultimate Guide","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg","datePublished":"2025-11-03T06:45:00+00:00","dateModified":"2025-11-03T10:41:50+00:00","description":"This guide will cover the steps to installing Java on CentOS 10, including OpenJDK and Oracle Java. Learn more!","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/11\/Install-Java-on-on-CentOS-10-1.jpg","width":1020,"height":600,"caption":"Install Java on CentOS 10"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-java-on-centos-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Install Java on CentOS 10 : Ultimate Guide"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=15550"}],"version-history":[{"count":3,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15550\/revisions"}],"predecessor-version":[{"id":15568,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15550\/revisions\/15568"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/15566"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=15550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=15550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=15550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}