This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1) writing my program in a text file say the path is "c:\myprograms\src\abc.java"
2) opening command prompt and going to src directory
3) my java is in "c:\program files\java\jdk\bin"
4) so running the following command "set classpath="C:\Program Files\Java\jdk1.6.0_18\bin";"
Now to test if class path is set I am typing java in the prompt and pressing enter... It is recognizing the command correctly...
But when i am typing javac and pressing enter its not recognizing it..... it gives
'javac' is not recognized as an internal or external command, operable program or batch file.
Don't know what could be wrong.... since i am setting up class path here only.. i dont think the error is due to environment variables....
I also uninstalled and reinstalled the JDK.. but not working....
The class path is for class files, not for executables. For executables, you need to add it to the windows path variable. And you need to *add* it, not replace it, or other executables in windows will no longer work.