I have recently installed jdk7 on my windows vista. I have used default installation in C:\\Program Files\\Java\\jdk1.7.0_02\\
with javac
stored i
Open a command-line window, type "path" and check if "C:\Program Files\Java\jdk1.7.0_02\bin" is listed. If not try setting the path in that window (just to check if it works): "set path=C:\Program Files\Java\jdk1.7.0_02\bin\" and try running "javac" again.
Do check properly in your path variables, you must have kept a space somewhere, else it must run. Do check properly, something is wrong while setting up path and classpath variables. Like for example, Your path variable already has something like say C:\Apache\bin\servlet-api.jar, now since you adding java to it you might have kept one space like
C:\Apache\bin\servlet-api.jar; C:\Program_Files\Java\jdk1.7.0\bin
you have to remove that space, and do it like this
C:\Apache\bin\servlet-api.jar;C:\Program_Files\Java\jdk1.7.0\bin
Do check properly, you must have left some space(gap) somewhere
Example :
Variable : JAVA_HOME
Value : C:\Program_Files\Java\jdk1.7.0
Variable : PATH
Value : %JAVA_HOME%\bin
Now open cmd, and type echo %JAVA_HOME% This must show your location to JAVA_HOME as set before.
**EDIT : I have configured my PATH environmental variables (both for my user and system variables) with C:\Program_Files\Java\jdk1.7.0\bin and JAVA_HOME (as my user variable) with C:\Program_Files\Java\jdk1.7.0**
** But before that you are saying that your java is installed at this location**
C:\Program Files\Java\jdk1.7.0_02\bin
why this different location, you are setting it for jdk1.7.0 but you said it's inside jdk1.7.0_02.
Hope that might help
Regards
You have an underscore in your entries that were put in the PATH variable. This will not work correctly.