How to Install Java JDK 21 on Windows 10 | Amit Thinks

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello guys, welcome to Amit Thinks.  In this video we will learn how we can   easily install Java JDK 21 on Windows 10  let's see at first go to the web browser   I am using Chrome you can use any web browser  on Google type Oracle Java and press enter on pressing enter the official website  is visible click on it that is oracle.com   here is the link on reaching the link the download  Java button is visible click on it to download now we have reached the download section go below you can see Java 21 is visible now  we want for Windows so I'll go below   and here it is for Windows and we want  an installer exe file here it is click   on it to download it's only 160 MB now to  download started let's wait for few seconds we have successfully downloaded the exe file  click on it to begin the installation minimize the installation started click next herein Java  will get installed in the following location   keep it as it is we will check  this location later click next installation started we have successfully installed it click close now  go to the location it was in C drive program files Java jdk 21 hand and here it is we want the  bin path Erin right click and copy this path now minimize now we will set  the environment variable so that   so that you can access Java from anywhere  go to start type environment variables and click on the following edit the  system environment variables click on open   after that under Advanced click environment  variables here are the environment variables   you need to select the path double click click  new and just right click and paste the same path here it is the bin path now click ok  and the last okay now let us verify   the installation go to start type CMD  click on open to open the command prompt now what you need to do type the command   java --version and press enter to  verify the installation of java   here it is Java 21 that means we successfully  installed it now let us quickly see how to run   our first program in Java for that let us go to  the location we can create a folder here or let's   say I'll go to E Drive you can go to any Drive D  drive also herein I'll create a specific folder new folder let's say I'll name it Amit  project okay now go inside it now right click create a new text document let's say  here it is you can see the extension   is not visible we want an extension also so  that we can convert it to dot Java go to view   click file name extension now it's fine now let  us rename it now let us rename it right click rename now I'll name it to let's say  Studyopedia.java now when I'll keep the cursor   here it will ask me whether I want to change  the file extension yes yes I want to change it   now we have our Java file you can see Java file  now right click you can open it with any editor let's say I'll go for Notepad now let us quickly  print our first program okay type class and the   name of the class should be similar to the file  name that is the file name of Studyopediaso the   class name will be Studyopedia there  will be an error now let us print so here we have printed public static void main()  now what is public static void main() here in   public is an access specifier here in static  allows the main function to be called without   the need to instantiate a particular instance  why it is a return type and main() is called   when Java application begins these are for command  line arguments okay we are just printing a simple   program so I'll just print something now I'll just  print something now using system.out.println() now   you would be wondering what is this here  in system is basically a predefined class   to provide access out is the output stream to  print something and println() is the actual is   the function that will allow you to display  the string in it so let's say I'll just type okay now I'll just click file and save that's it now I need to reach the following path on command  prompts so the easiest way would be to type CMD   here and press enter now we have now we have a new  command prompt we directly reach the path okay now   it's simple just type javac to compile because  we compile the Java program first then we run it   and I mentioned the name of the file that is  that is the following Studyopedia.java under   E Drive you can create in any Drive press  enter if there will be an error it will show   it so there is a semicolon error no problem  here it is file save that's it now go to here   use the same command using arrow keys  or you can directly type it again press enter javac Studyopedia.java  and now there should be no error yes   now you can see after compiling a new class  file generated at the same time so this is   how so this is how JVM works that is Java  virtual machine concept works works while   compiling a program and running it now  we will run it java Studyopedia that's it   now I don't need to add the extension just press  enter and here it is Amit Thinks YouTube channel   it printed it and this is what we were having  Amit Thinks YouTube channel so guys in this   video we saw how we can easily run our  first how we can easily install Java 21   and another first Java program  thank you for watching the video
Info
Channel: Amit Thinks
Views: 67,961
Rating: undefined out of 5
Keywords: Install Java JDK 21, JAVA JDK 21, Install Java 21, Install Java, Java, Set Java Environment Variable, Learn Java, How to install Java, Install Java on Windows 10, Install Java 21 on Windows 10, Windows 10, Java JDK 21, Amit Thinks, Studyopedia, how to install java, install java 21, how to install java on windows 10, install java, set java environment variable, how to install java jdk on windows 10, how to download java 2023, amit thinks, windows 10, how to install java jdk
Id: 4Bp3AbR8ne8
Channel Id: undefined
Length: 7min 20sec (440 seconds)
Published: Wed Sep 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.