Install Java in ubuntu (linux) | 2022

Published: 14 January 2022
on channel: Code-X
321
7

In this video, I'm going to show you how to install Java and set the environment path on Ubuntu (linux).

First update the system before installing JDK or JRE
$ sudo apt update

Install JDK & JRE
$ sudo apt install default-jdk
$ sudo apt install default-jre
$ sudo apt install openjdk-8-jdk

Update system and installed
$ sudo apt update

Check Java version to confirm the installation
$ java --version

To set the Environment, we need to copy the path for the desired Java version
$ sudo update-alternatives --config java
$ sudo gedit /etc/environment

// Example
JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/bin/java"

Check Java by Running Sample Program

Create Simple.java

$ gedit Simple.java

Write code, compile and run
$ javac Simple.java
$ java Simple


Subscribe and press bell icon for more videos.



Music Credit:
''''''''''''''''''''''''''''''''''''''''''''''''
Track: Altrøx - Summer [NCN Release]
YouTube:    • Altrøx - Summer (Lyric Video) [NCN Re...  

#happycoding #spreadlove


On this page of the site you can watch the video online Install Java in ubuntu (linux) | 2022 with a duration of hours minute second in good quality, which was uploaded by the user Code-X 14 January 2022, share the link with friends and acquaintances, this video has already been watched 321 times on youtube and it was liked by 7 viewers. Enjoy your viewing!