Showing posts with label Installation Tutorial. Show all posts
Showing posts with label Installation Tutorial. Show all posts

Tuesday, 5 November 2024

How to Install JDK 23 on Linux OS or Amazon EC2 | JDK 23 Installation on Linux OS or EC2

🚀 Master Java & AWS!

Subscribe to Ram N Java for the most simplified tech tutorials!

SUBSCRIBE TO OUR CHANNEL

How to Install JDK 23 on Linux or Amazon EC2

Setting up JDK 23 on a Linux server or an Amazon EC2 instance is a core skill for any developer. This guide will walk you through the process step-by-step, from updating your system to verifying your installation.

Step 1: Update Your Linux System

Before installing new software, it's a best practice to ensure your existing packages are up to date. Run these commands in your terminal:

sudo yum update -y
sudo yum upgrade -y

Step 2: Download the JDK 23 Archive

Visit the Oracle JDK download page and copy the link for the Linux x64 Compressed Archive. Then, use the wget command to download it directly to your server:

wget [PASTE_THE_DOWNLOAD_LINK_HERE]

Step 3: Extract the JDK

Once the download is complete, extract the files to the /opt directory, which is the standard place for optional software packages:

sudo tar -xvf jdk-23_linux-x64_bin.tar.gz -C /opt

Step 4: Set Environment Variables

To make Java available system-wide, you need to set the JAVA_HOME and PATH variables. Open the /etc/profile file:

sudo nano /etc/profile

Add these lines at the end of the file:

export JAVA_HOME=/opt/jdk-23.0.1
export PATH=$PATH:$JAVA_HOME/bin

Then, apply the changes with: source /etc/profile

Step 5: Verify the Installation

Finally, check if everything is working by checking the Java version:

java -version
javac -version

📥 Download Free Resources!

I've included the PowerPoint presentation and Java source code for this tutorial in the video description on YouTube. Head over there to grab your copies!

Tuesday, 15 October 2024

How to Install JDK 17 on Linux and Amazon EC2 | JDK 17 Installation on Linux OS or Amazon EC2

🚀 Join the Ram N Java Community!

Subscribe now for the best AWS, Cloud, and Java tutorials!

SUBSCRIBE TO OUR CHANNEL

Mastering JDK 17 Installation on Linux & Amazon EC2

Installing JDK 17 is a critical first step for building modern Java applications on the cloud. Whether you are using a local Linux server or an Amazon EC2 instance, this guide will show you how to get it done efficiently using the command line.

Step 1: System Preparation

Before installing new software, always update your package repository to ensure you have the latest security patches and metadata. Execute these commands:

sudo yum update -y
sudo yum upgrade -y

Step 2: Download the JDK 17 Archive

We will use wget to download the Linux x64 Compressed Archive directly from Oracle's servers. This method gives you total control over the installation location.

wget [ORACLE_JDK_17_DOWNLOAD_LINK]

Step 3: Installation & Directory Setup

Extract the downloaded .tar.gz file into the /opt directory. The /opt folder is the standard place for third-party software on Linux.

sudo tar -xvf jdk-17_linux-x64_bin.tar.gz -C /opt

Step 4: Configure the Environment

To make the java and javac commands work from any folder, you must edit the system profile. Open /etc/profile and add your new JAVA_HOME path:

export JAVA_HOME=/opt/jdk-17.0.x
export PATH=$PATH:$JAVA_HOME/bin

Reload the configuration by typing: source /etc/profile

Step 5: Final Check

Confirm the installation was successful by checking the version number in your terminal:

java -version

📥 Grab Your Free Study Materials!

I provide the PowerPoint presentation and full source code for this tutorial! Check out the download links in the YouTube video description to get them for free.

Tutorials