Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-03-27
7
Medium Priority
?
488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 34

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 2000 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 34

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

688 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