I am running on a windows 7 machine.
I installed java jdk 1.7.
I have set the Path and PATH environment variable to point to the java jdk 1.7/bin directory.
executing java -version in the command prompt yields java version 1.7.0_45 ...
however when I execute javac it says that javac is not recognized as an internal or external command ...
I am really stumped on this problem. I really want to get this resolved ASAP. If anyone has experienced similar issues can you please share.
All other threads seem to get similar issues resolved via changing the environment variable but this is not solving my problem in this situation.
EDIT: when I run java -version in Console2 it says that the currently used version of java is 1.6 and I am not sure why this is the case.
解决方案
Not sure if this is the cause, but in the path you posted
C:\Program Files\Java\jdk1.7.0_45 \bin
Looks like an extra space in between of "jdk1.7.0_45" and "\bin"
Also it's always good to append ";" at the end.
PATH = C:\Program Files\Java\jdk1.7.0_45\bin;