Finally, we have to check if java is installed properly or not. We can do that by using
java -version
command in command prompt, as shown in below image.
Note: In older java versions and other windows operating systems, you need to setup two environment variables to get it working.
Go to
System Properties (Right Click on My Computer and select Properties) > Advanced > Environment Variables
.
In the popup window, System variables section, click on New button and add a variable with following details:
Name: JAVA_HOME
Value: C:\Program Files\Java\jdk1.6.0_25
After this, you need to edit the Path variable already present there. Just select Path variable and click on Edit button. In the popup window value section, go to the end and add following
;C:\Program Files\Java\jdk1.6.0_25\bin
(The colon ; is used as delimiter, so don’t miss that!)
Now your setup is done and you can check it by opening a command prompt and running command
java - version
.
In windows 10 and java 9 we don’t need to do these manually. Java installer takes care of that and you can check environment variable Pathvalue, as shown in below image. Note that we don’t need to set JAVA_HOME variable.
0 Comments
If you have any doubts,please let me know