Java Fundamentals Tutorial for Beginners - How to Install OpenJDK on Linux

Опубликовано: 09 Октябрь 2024
на канале: Polymath Mind
19
1

In this video of the Java Fundamentals Tutorial, we will be going over how to install OpenJDK on Linux Ubuntu distro. OpenJDK is the open source version of the Java development kit, compared to the Oracle JDK version, which requires registration and following the license agreements. The process is very straightforward. In a few minutes, you'll have Java installed.

TL;DW Step-By-Step Instructions
----------------------------------------------------
1. Open the command line
a. Check if java is installed on your program by inputting 'java -version'
b. If Java is not installed, then we will download the java version, otherwise, you are good (you can stop reading the instructions)
2. input 'sudo apt update'
3. Enter your password
4. input 'sudo apt install openjdk-17-jre-headless'
5. Press 'y' for any prompts. It will take a couple minutes to download
6. Confirm if java 17 is installed on your local computer by inputting 'java -version'
7. input 'sudo apt install openjdk-17-jdk-headless'
8. After the installation, input 'javac -version' to confirm the version of javac is 17
9. To the directory where java is installed, input 'which java'