How To Install Java JDK and JRE on Oracle Linux Server 9
How To Install Java JDK and JRE on Oracle Linux Server 9
Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.
OpenJDK or Oracle Java
OpenJDK is an open-source implementation of the Oracle Java SE platform edition. Oracle develops Oracle Java SE, whereas the OpenJDK is developed by Oracle Corporation, OpenJDK and Java Community, Red Hat, Azul Systems, IBM, Apple Inc, and SAP SE.
__________________________________________________________________________________________________________________________________
Server - Os: Oracle Linux Server 9 64Bit | IP -192.168.1.50 |Hostname - server.testbox.com
__________________________________________________________________________________________________________________________________
cat /etc/system-release ; dnf groupinstall "Development Tools" -y
Method - 1
dnf update
sudo dnf install java-11-openjdk java-11-openjdk-devel
java -version
Method - 2
Install Java OpenJDK 16 Manually from TAR.GZ File-
wget https://download.java.net/java/GA/jdk16.0.2/d4a915d82b4c4fbb9bde534da945d746/7/GPL/openjdk-16.0.2_linux-x64_bin.tar.gz
tar -xf openjdk-16.0.2_linux-x64_bin.tar.gz
mkdir -p /usr/lib/jvm ; mv jdk-16.0.2 /usr/lib/jvm
alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-16.0.2/bin/java" 0
alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-16.0.2/bin/javac" 0
alternatives --list
sudo alternatives --config java
sudo alternatives --config javac
java --version ; javac --version
Setup JAVA_HOME Environment Variable-
cd /etc/profile.d/ ; nano java.sh
JAVA_HOME="/usr/lib/jvm/jdk-16.0.2"
source /etc/profile.d/java.sh
echo $JAVA_HOME
__________________________________________________________________________________________________________________________________
Test Java Installation-
nano HelloWorld.java
public class helloworld {
public static void main(String[] args) {
System.out.println("Hello Java World from india!");
}
}
java HelloWorld.java
Related Posts:
- How To Setup LVS (Linux Virtual Server) Load Balancer on Rocky Linux 8.5
- How To Install Magento 2.4 on Rocky Linux 8
- How To Install Docker on Oracle Linux Server 9
- How to Install WHM/cPanel in Almalinux?
- How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8
- How To Install EMQX MQTT Broker on Rocky Linux 8
- How To Install Kamailio SIP Server on Rocky Linux 8
- How to Install and Configure RabbitMQ Server on Rocky Linux 8
- Setup Quick DNS Server On Rocky Linux 8.5 Using Dnsmasq
- 2 Ways To install Ruby On Rocky Linux | RVM
Latest Posts
- Server-Side Scripting: PHP, Node.js, Python – A Detailed Comparison
- Securing Your Website in 2024: Essential Strategies for Online Safety
- The Future of Web Development Technologies: Trends to Watch in 2024
- How Banks Handle Server-Side Operations and Ensure System Security: An Inside Look
- Tips for Writing Clean, Understandable, and Efficient Code: Avoiding Garbage Code
- Tailwind CSS: Revolutionizing Modern Web Design
- Basic Linux Commands for Beginners: A Starter Guide
- Dairy Farming Loan Apply
- BSNL Recharge Plan
- Bijli Bill Mafi Yojana Online Apply
Technical
- DevOps Roadmap
- How To Install and Configure an SNMP on Ubuntu 20.04
- Apple releases iOS 18 Developer Beta 2 with iPhone screen mirroring, RCS toggle,and more
- How to enable SNMP on Ubuntu Linux 18.04 and above
- How to Force HTTPS Using .htaccess (Updated 2024)
- Display All PHP Errors: Basic & Advanced Usage
- PHP alert
- MongoDB loads but breaks, returning status=14
- MongoDB database deleted automatically
- MongoDB all Error Solutions
Category