Reputation: 4300
I've looked in numerous threads here and on Google and cannot find a solution.
I've installed the latest version of Java JDK (1.6.0_26) on my 64-bit Windows 7. I've added the file path "C:\Program Files (x86)\Java\jdk1.6.0_26" to JAVA_HOME, and added "C:\Program Files (x86)\Java\jdk1.6.0_26\bin" to the CLASSPATH and PATH variables. I've restarted my machine. But, I when I go to to run javac -version from the command line, I receive the error
'javac' is not recognized as an internal or external command, operable program or batch file.
Please let me know what I should do! I'm attempting to use Appcelerator's Titanium but it requires a valid path for javac. Thanks!
For reference, here is my PATH variable.
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x8
6)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\
Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Fil
es\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Progra
m Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Roxio Shar
ed\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:
\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (
x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\
OEM\AudioCore\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\WIDCO
MM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64; C:\
Program Files (x86)\Java\jdk1.6.0_26\bin;
Upvotes: 2
Views: 15607
Reputation: 1
I was facing the same problem, I set the path in command line:
set path = "c:/...."
but it was not recognized as path, than I checked my Windows type (x64) and Java type (x64). Then I set the path manually in system variables in the properties of My computer and re-opened the cmd prompt, it worked.
Upvotes: 0
Reputation:
The error is just what it says. javac
is not found on the path. (This issue has nothing to do with Java, rather windows cannot find the unqualified executable in the current path or search "PATH" paths.)
Locate the javac
file manually. Verify it can be run with the found path.
Ensure the path is put in PATH environment variable correctly (it must be separated from other entries with a semi-colon (;
)). The CLASSPATH is not relevant here. Depending on how PATH is set, it may require restarting the windows shell (e.g. log out and log back in). Verify the new PATH is correct with echo %PATH%
from a console.
Run javac
and verify it is executed.
Happy coding.
Upvotes: 1