How to check Java Version By Using Command
Answer: Type cmd in Your Search Bar Then Press Enter and write this command. java hyphen version => java -version
![](https://i0.wp.com/innovatejourney.in/wp-content/uploads/2023/12/cmd1.png?resize=752.4%2C132&ssl=1)
First write java hyphen version(java -version) then press enter.
![](https://i0.wp.com/innovatejourney.in/wp-content/uploads/2023/12/cmd2.png?resize=752.4%2C271&ssl=1)
Now You can see which version you have installed
Note: If this type of output is not coming so we have to set path in environment variable
There are some following Steps to set Environment variable :
- Open your c drive and follow this path=> C:\Program Files\Java\jdk-17.0.4.1\bin
- Copy this path
![](https://i0.wp.com/innovatejourney.in/wp-content/uploads/2023/12/binpath.png?resize=752.4%2C809&ssl=1)
3. Now search Environment variable
click on path
![](https://i0.wp.com/innovatejourney.in/wp-content/uploads/2023/12/inviron1.png?resize=752.4%2C498&ssl=1)
Select path then click on New of User variable button. Now Write path in Variable name and paste the URL in Variable value. like shown in below image
![](https://i0.wp.com/innovatejourney.in/wp-content/uploads/2023/12/usv1.png?resize=747%2C215&ssl=1)
Now You will find your installed version of java by using java -version command in cmd
Leave a Reply