How to install and configure Java JDK 22 on Ubuntu 22.04 LTS | install java jdk 22 on Ubuntu Linux

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys in this video we will see how to install Java latest version that is Java 22 on open to machine see I have connected to machine Let's verify present version of java Java hyphen hyphen version see on my machine I have the open jdk 17 so I'm going to install the latest version so control L to clear screen open Firefox then go to Google Search for Java download click on this Java downloads see here we have the Java jdk for 22 21 jdk 17 okay so the latest version at the time of making this video is Java jdk 22 so right click on it copy link then go to the terminal W get then paste that link so it will download the deban package hit enter see it a size is 160 mbes wait until this download completes see dein package successfully downloaded LS see here we have the jdk 22 linux. deban package contrl L to clear screen LS okay now install this Deb package sudo dpkg hph 9 then space then jdk then give the tab Auto fills the entire de package and hit enter provide the password of sudo user and hit enter contrl L to clear screen if we run Java hyph hyphen version still we are getting the older version so this is is the default Java version if you run any program it will compile with this older version okay so to change it we have to run the command sud sudo update hyphen Alternatives hyphen hyphen config then Java then hit enter provide the sudo user see here we have these four versions like 17 21 22 okay so if you give one again it will be the 17 if you give two it will be the 21 okay so the latest one is 22 so I'm giving the number three because it number is three let me Max see we have these three numbers 1 2 3 we have to give any one of them based on requirement so I'm giving three and hit enter now see here it is changed now run the Java hyphen hyphen version see the current version is Java jdk Java 22 okay so control L to clear now now let's create a sample Java program and compile it sudo VA first program do Java then provide the code I2 insert mode then paste this sample program I will keep this program in the video description escape and save the file now run Java C program first hit enter LS see here it has created R2 schools class run Java R2 schools see we got the output now add one more line to the program ship here to edit system. out. print Ln sum of 8 + 9 put the semicolon at the end of the statement save the file you can use any text editor not only VI okay now run the same Java see we got the old output so to get new output every time we have to compile so run the the same Java C Java file now run the Java C we got the output 70 okay so this is the way to compile to execute and compile the Java program after installation you have to remove this jdk file so in this video we have seen how to download and install Java jdk 22 on2 2204 LS version then we have seen how to update the Java version then we have created sample Java program and compiled it and executed it for more Java videos please subscribe my channel thank you
Info
Channel: r2schools
Views: 2,642
Rating: undefined out of 5
Keywords: Download and install Java on Ubuntu 22.04, How to install java on Ubuntu 20.04, How to install java on Ubuntu 22.04, How to install java on Ubuntu Server, How to install java on Ubuntu, Install Java 22 on Ubuntu, How to install java jdk 22 on Ubuntu, How to install java jdk on Ubuntu 20.04, How to install java jdk on Ubuntu 22.04, How to install java jdk on Ubuntu, Install java jdk 22 on Ubuntu, Java Installation on Ubuntu 22.04, Java jdk install on Ubuntu, java jdk 22 install
Id: pDUSPZ4TYi8
Channel Id: undefined
Length: 5min 6sec (306 seconds)
Published: Wed Apr 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.