How to Install Java JDK 22 on Windows 11

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to Amit things in this video we will learn how to download and install the current Java version that is Java 22 on Windows 11 with that after installing we will also run our first Java program let's start at first go to the web browser I am using Chrome you can use any web browser on Google type Oracle Java open the first website oracle.com here it is now go to top right and uh click on download Java after clicking the downloads page would be visible go below and here are the versions current version Java jdk 22 okay we we want for Windows so click here after that uh you can see three versions are visible we will go for the following exe file for Windows 64-bit this works for both Windows 10 and windows 11 I'll click here download started let's wait it's only 164 MB the exe file downloaded let us start the installation right click click open minimize installation started click next the files will get saved here it will get installed in the C drive keep it as it is Click next now it will install we have installed click close now let us set the path go to the path wherein we installed Java it was C drive program files Java Open click on bin right click copy this path now go to start type environment variables click on the system environment variables that is edit the system environment variables click open now click environment variables here in go to path under system variables double click click new and right click paste the same path Okay now click okay okay and the last okay to apply it now let us verify the installation go to start type CMD click on open now CMD started type the command Java space hyphen hyphen version enter if the following is visible that means we successfully installed Java 22 now let us create our first program quickly go to any Drive let's say I'll I'll create a new file under D drive right click new click on the text document let's say I'll name the file studiopia now you can see txt is visible for Java we want do Java so right click and rename do Java when I'll keep the cursor here it will ask me do you want to change the file name extension yes so now we have a Java file you can see Java source file if you're not getting these extensions on Windows 11 no problem go to view click show and select file name extensions I already selected it therefore it is visible I'll uncheck it to show you now you can see the extension vanished now you won't be able to change it so it's good to just go to view show and click on file name extensions and rename it now we have our studio. Java file right click you can open it in notepad++ if you're having it or you can directly click on EDI in notepad okay here it is I'll show in notepad for everyone now let us write our first code quickly so we will use the class keyword then the class name always remember in Java the class name should be equalent to the file name so our file name was studiopia keep the class name as studiopia now now what we did we added public static void men public is our exess specifier okay static basically allows the following main function to be called without the need to instantiate a particular instance okay void is a return type the main function gets called when the Java application begins these are for command line arguments okay now we are running our first program so I'll I'll just print something using the system predefined class do out out is the output stream do print Ln is our method to print something let's say I'll print my name here that's it add a semicolon and save it now we have our program in the D drive now guys go to the command prompt I hope you know to switch to to the D drive from C drive you can just type D colon and and press enter remember you can create a program in any Drive CDE EF any drive we have reached the D drive now let us check whatever we have here using the Dr command now you can see we have all these folders we also have study op. Java this file we will just just compiler program type Java c means Java compilation space the file name the complete name studiopia do Java okay and press enter we compiled it successfully and a new class file generated just now so this is the jvm concept Java virtual machine concept now let has run it Java space the file name while running do not mention the extension press enter now here it is we successfully printed amid thean this was our file we printed uh using system.out.println so guys you can easily install Java and run your first program now if you want a complete tutorial go to our website studiopia this is the link and go to our Java tutorial here it is you can refer the complete tutorial it is having around 38 lessons thank you for watching the video
Info
Channel: Amit Thinks
Views: 55,011
Rating: undefined out of 5
Keywords: Install Java JDK 22, JAVA JDK 22, Install Java 22, Install Java, Java, Set Java Environment Variable, Learn Java, How to install Java, Install Java on Windows 11, Install Java 22 on Windows 11, Windows 11, Java JDK 22, Amit Thinks, Studyopedia
Id: 5LlfwQ4xzXc
Channel Id: undefined
Length: 8min 43sec (523 seconds)
Published: Sun Mar 24 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.