Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Linux

How to Install Oracle Java 17 on Debian

by Hollie Moore
3 months ago
in Linux
Oracle Java 17
ShareTweetSendShare
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

Learn how to install Oracle Java 17 on Debian by following a simple step-by-step guide. Set up the environment variables and unleash the power of Java 17 on your Debian system.

ADVERTISEMENT

Oracle Java is a popular programming language and platform for creating and running a variety of applications. If you are using Debian and need to install Oracle Java 17 on Debian, this article will walk you through the installation process step by step. Please keep in mind that Oracle Java must be installed manually on Debian because it is not accessible in the official Debian repositories. In this article, I’ll show you How to Install Oracle Java 17 on Debian step by step procedures.

Table of Contents

  1. Prerequisites
  2. Step 1: Initial Setup
  3. Step 2: Search for Java 17 Package
  4. Step 3: Install Java 17
  5. Step 4: Verify Java 17 Installation
  6. Step 5: Configure Environment Variables
  7. Step 6: Validate Java Path
  8. Conclusion

Prerequisites

  • You should have a Debian 11(Bullseye) system up and running.
  • To run root commands, you must have sudo or root access.

Step 1: Initial Setup

Make sure your system or server packages are updated to the latest version available.

sudo apt update
sudo apt upgrade -y

Step 2: Search for Java 17 Package

You can search your Debian 11 system to find if Java 17 packages are available in the system repositories.

ADVERTISEMENT

Execute the below command to search for Java 17.

You might also like

Symbolic Links In Linux

Symbolic Links in Linux: What They Are and How to Use Them

2 months ago
Ubuntu Password

Reset your Forgotten Ubuntu Password in 2 Minutes

2 months ago
sudo apt-cache search openjdk | grep 17

If you get the below output you, you are having JRE and JDK repositories available in your Debian system.

openjdk-17-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-17-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-17-doc - OpenJDK Development Kit (JDK) documentation
openjdk-17-jdk - OpenJDK Development Kit (JDK)
openjdk-17-jdk-headless - OpenJDK Development Kit (JDK) (headless)
openjdk-17-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-17-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-17-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-17-source - OpenJDK Development Kit (JDK) source files

Step 3: Install Java 17

Execute the below command to install Java JRE.

ADVERTISEMENT
sudo apt install openjdk-17-jre

You can also install JDK using the below command.

sudo apt install openjdk-17-jdk

Once the installation is complete, you should have Java 17 installed on your Debian 11.

ADVERTISEMENT

Step 4: Verify Java 17 Installation

Verify the installation using the below command

java --version

You will receive an output similar to the one below.

ADVERTISEMENT
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Debian-1deb11u1, mixed mode, sharing)

Step 5: Configure Environment Variables

To set the Java environment variables, you need add the following lines to your profile to export Java path.

Execute the below command to create a new file in your profile.d directory or to your bashrc file, so that each time you open your terminal this file runs.

ADVERTISEMENT

Now we will add the Path to the profile.

cat <<EOF | sudo tee /etc/profile.d/jdk.sh
export JAVA_HOME=/usr/lib/jvm/jdk-17/
export PATH=\$PATH:\$JAVA_HOME/bin
EOF
echo 'export JAVA_HOME=/usr/local/jdk-17' >> ~/.bashrc
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc

These commands  will append the export lines to the end of the.bashrc file.

To implement the changes instantly, you must source the.bashrc file. Execute this command:

source ~/.bashrc

The environment variables in your current terminal session will be modified when you source the file. If you do not wish to source it right now, the modifications will be applied the next time you launch a new terminal session.

Step 6: Validate Java Path

Run the following command to validate the JAVA_HOME environment variable:

echo $JAVA_HOME

Also read: You might also find useful our guide on How to Install MongoDB on Debian 11

Conclusion

Finally, installing Oracle Java 17 on Debian entails downloading the relevant package, extracting the files to the desired location, and configuring the necessary environment variables. Users may assure a successful installation and verification of Java 17 on their Debian system by following the step-by-step instructions provided, allowing them to take advantage of its features and capabilities. Please feel free to share your thoughts and feedback in the comment section below.

Tags: DebianJava
Share1Tweet1SendShare
Hollie Moore

Hollie Moore

Greetings, I am a technical writer who specializes in conveying complex topics in simple and engaging ways. I have a degree in computer science and journalism, and I have experience writing about software, data, and design. My content includes blog posts, tutorials, and documentation pages, which I always strive to make clear, concise, and useful for the reader. I am constantly learning new things and sharing my insights with others.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

&Quot; Systemd Service On Linux

How to Create a New systemd Service on Linux: A Step-by-Step Guide

3 months ago
List Groups In Linux

How to List Groups in Linux: A Guide for Beginners

3 months ago
Hostname In Linux

How to Modify the Hostname in Linux

3 months ago
Linux Systems

Linux systems Hacked with OpenSSH Malware

3 months ago

Follow Us

Trending Articles

Free Dating Sites For Men

Top 7 Free Dating Sites for Men in 2023

September 15, 2023

Create High Quality AI Cover Song with Covers AI

How to Create and Customize Stunning Contact Poster on iPhone

HeyGen AI: Free AI Video Generator to Create Amazing Videos

5 Free AI Soulmate Maker: Create Your Perfect Match

10 Best AI Prompts for Writers to Improve Website SEO

Popular Articles

Undressai_1

7 Free Undress AI Tools to Remove Clothes from Images

September 19, 2023

Free AI Script Generators Online to Create High Quality Scripts

How to Create a Personal AI Assistant with LocalGPT

OpenAI Introduces ChatGPT Enterprise for Businesses

Top 5 Free Linux Cloud Servers to Host Your Website

10 Best AI Mockup Generators to Create Stunning Mockups

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Cloudbooklet Logo

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Applications
  • Linux

Cloudbooklet © 2023 All rights reserved.