0
Javac in command prompt isn't working
Greetings,... I get the following message when I type 'javac' in command prompt: 'javac' is not recognized as an internal or external command, operable program or batch file. any ideas? thanks again
4 Antworten
+ 6
Set the path variable in your environment:
https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
+ 3
you can directly set the path by using this command
set path="%path%;c:\program files\java\jdk1.6.0_16\bin"
By way of checking, execute:
echo %path%
from your command prompt and let us know what it is.
Otherwise, make sure there is a javac in that directory by trying:
"c:\program files\java\jdk1.6.0_16\bin\javac.exe"
from the command prompt. You can also tell which executable (if any) is being used with the command:
for %i in (javac.exe) do @echo %~$PATH:i
This is a neat trick similar to the which and/or whence commands in some UNIX-type operating systems.
+ 2
hey man, go to java tutorial point and folloe the step for setting path to environmental variable
0
thanks for the responses, my mistake was that I left out the 'bin' at the end for the path. whoops... but good to know there's help when I need it.
thanks a ton you guys