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

First write java hyphen version(java -version) then press enter.

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 :

  1. Open your c drive and follow this path=> C:\Program Files\Java\jdk-17.0.4.1\bin
  2. Copy this path

3. Now search Environment variable

click on path

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

Now You will find your installed version of java by using java -version command in cmd

Leave a Reply

Your email address will not be published. Required fields are marked *

*