I did the following steps but java does not seem to be working for me, do I need to restart my system if yes then why?
1. Right click My Computer->Advence
No, but you will need to close and recreate any cmd windows, running java programs, or the like.
cmd
To check it's correct, open a new cmd window and type set -> review the information for PATH and JAVA_HOME.
set
PATH
JAVA_HOME