Solved

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

Posted on 2012-03-27
7
448 Views
Last Modified: 2012-03-27
'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
0
Comment
Question by:Mike Eghtebas
  • 5
  • 2
7 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 37772551
JAVA_HOME isessentila for tomcat

in this case check your PATH, you need to have

JDK home folder/bin in your path
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37772555
say

PATH=C:\j2sdk1.4.2_01\bin

then it shoudl work if you have JDK there of course
0
 
LVL 47

Expert Comment

by:for_yan
ID: 37772569
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 47

Expert Comment

by:for_yan
ID: 37772581
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
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 37772696
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
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 37772710
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
 
LVL 33

Author Closing Comment

by:Mike Eghtebas
ID: 37772815
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

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question