'javac' is not recognized as an internal or external command,

'javac' is not recognized as an internal or external command, operable program or batch file.

JAVA_HOME is set a C:\j2sdk1.4.2_01  (also tried with C:\j2sdk1.4.2_01\bin)

Is JAVA_HOME setting for use by Tomcat only? Java configuration has to be done elsewhere?


I searched for jkd and have the result in the attached image.


The above message comes up when I run:

C:>javac ClassName.Java

Question, What can I do to correct the problem?

Thank you.
JDK.bmp
LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?
 
for_yanConnect With a Mentor Commented:
Normally you want to edit the PATH variable.
If it is disabled - it means you don;'t have admin privileges and cannot modify it for th e whole system.
If so then just do it in every cmd dos window which you open

First specify PATH pointing to C:\j2sdk1.4.2_01\bin  and then launch javac

I'm not sure than changing in upper window will help
0
 
for_yanCommented:
JAVA_HOME isessentila for tomcat

in this case check your PATH, you need to have

JDK home folder/bin in your path
0
 
for_yanCommented:
say

PATH=C:\j2sdk1.4.2_01\bin

then it shoudl work if you have JDK there of course
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
for_yanCommented:
Your screenshot is not informative

got to C:\j2sdk1.4.2_01 folder and check if theis bin inside and inside bin there should be
java.exe javac.exe, etc, etc

Then put C:\j2sdk1.4.2_01\bin
in the PATH in the dos winodw before you try to run javac
and then it should run
0
 
for_yanCommented:
Alternatively go to

control panel -- System -advanced(tab on tope)  - Environement Vraibales (bottom button) and modify value of PATH to include C:\j2sdk1.4.2_01\bin folder - better in the pbgining of your path

then save

and all dos windows which you open afterwtrads type PATH
and you'll see that path in there
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
So I need to add new variabel caled PATH, right?

I will add to top wndow as shown in the attached image.

The path in the lower window is disabled for me.

Thanks
Path-JDK.bmp
0
 
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Adding to the upper window seems to work. Meaning it compile and will test more later and report it back to you.

Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.