'javac' is not recognized as an internal or external command, operable program or batch file.
Jay Nisha
Greenhorn
Joined: Jun 30, 2009
Posts: 24
posted
0
Hi,
I am using jdk1.6.0_22 . and I have set path variable to C:\Program Files\Java\jdk1.6.0_22\bin but when i am trying to compile any java program written anywhere then it shows me the error as follows............
D:\SCJPPR~1\7_GENE~1>javac TestSort1.java
'javac' is not recognized as an internal or external command,
operable program or batch file.
and see what that window's current path is - make sure it includes the correct path to the java bin.
Never ascribe to malice that which can be adequately explained by stupidity.
Paul Okeke
Ranch Hand
Joined: May 16, 2009
Posts: 58
posted
0
According the value you wrote, the path value is correct but I will advice you to do these checks.
Depending on who you set the path:
I am assuming that you run windows If you have set it permanently on your machine in the environment variable, the confirm that there is a ";" separating any path preceding the one you just set.
Again open the command prompt and type echo %path%
You should get a list all the items in your path (each separated with ;) including the path to your JDK.
Else, open a new Command Prompt and type:
set path=
set path=thePathToYourJDK_JustAsYouIndicatedAbove
OCJP 1.6
Jay Nisha
Greenhorn
Joined: Jun 30, 2009
Posts: 24
posted
0
mohamed sanaullah wrote:Once you have set the environment variables - You need to re enter the command prompt. Did you try that? And how did you set your PATH variable value?
Thanks Mohamed,
Your solution works.Actually I hadn't re enter the command prompt after setting environment variables.
Thanks for replying me n giving solution.
Nandu Nandini
Greenhorn
Joined: Jan 20, 2013
Posts: 2
posted
0
hi,
im using jdk 1.6.0 after i set the path, in command prompt its showing an error like 'javac' is not found as an internal or external command, operable program or batch file
please help me to solve this problem
Nandu Nandini wrote:hi,
im using jdk 1.6.0 after i set the path, in command prompt its showing an error like 'javac' is not found as an internal or external command, operable program or batch file
please help me to solve this problem
Considering that you posted to a two year old topic -- can we assume that you tried the suggestions in this topic and failed? And if so, can you tell us the details of what happened when you tried them?
ya i followed given suggesions but i am not able to compile program, if i enter javac to compile in command prompt its showing an error like 'javac' is not found as an internal or external command, operable program or batch file
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
4
posted
0
Welcome to the Ranch Did you open a new command line? The new PATH is not applied to the old command window.
How have you set your PATH environment variable? Please execute echo %PATH% and show us the output.
zira ramli
Greenhorn
Joined: Feb 24, 2013
Posts: 2
posted
0
this is path from cmd
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
4
posted
0
Those screenshots are illegible. Please post real text.
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
4
posted
0
Welcome to the Ranch Please don’t add new questions to an old thread; fortunately I can split off your question to a new thread.
Which environment variable is that? Why does it have so many components in? Does %JAVA_HOME% and with \?