wood burning stoves*
The moose likes Beginning Java and the fly likes Java / Javac not internal command Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java / Javac not internal command" Watch "Java / Javac not internal command" New topic
Author

Java / Javac not internal command

prathamesh bandivadekar
Ranch Hand

Joined: May 22, 2008
Posts: 43
Hi there,

Yesterday i installed java on my amchine windows xp.

when i m trying to run javac command it it giving me message as "'javac' is not recognized as an internal or external command,
operable program or batch file."

Directory location is " E:\Practice\Tomcat 4.1\webapps\sales\WEB-INF\classes\edu\met\dac\sales".

Other variables are
Java_home=C:\j2sdk1.4.2_16
path=C:\j2sdk1.4.2_16\bin
classpath=E:\Practice\Tomcat 4.1\common\lib\servlet.jar

i m trying to compile servlet stored at E:\Practice\Tomcat 4.1\webapps\sales\WEB-INF\classes\edu\met\dac\sales location.

Please help me.

Thanks in advance.


Prathamesh M.B.<br />Java....only.....
Clyde DeSouza
Greenhorn

Joined: Mar 16, 2009
Posts: 26
your path enviournment variable is not set using

set the classpath enviournment variable of your system By right clicking My computer --->properties--->Advanced---> Enviournment Variables

path= <path for your java Installation>jdk1.6.0\bin\;
path= <path for your java Installation>jdk1.6.0\jre\bin\;

just set these two , and for servlets set
path=<path for the tomcat installation>Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar;

==========Consolidate path will be==============

you can set path at command prompt also like this

set path=<path for your java Installation>jdk1.6.0\bin\;<path for your java Installation>jdk1.6.0\jre\bin\;<path for the tomcat installation>Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar;
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
You need to remember where you installed Java; if you can't try exploring your C drive -> Program Files -> Java -> jdk1.6.0_12 -> bin.
In bin you should find about 30 programs including java.exe, javac.exe, javaw.exe, javadoc.exe, etc.
Then find this Java Tutorials page; it tells you what to do about "java is not recognised" errors, and there is a link to instructions about setting your PATH. That is, as you have been told, the usual cause of that error message. The PATH entry should start with C: and end with bin.
A Java installation with 1.4. in its number is at least 4½ years old, so you ought to have something more recent than that.
prathamesh bandivadekar
Ranch Hand

Joined: May 22, 2008
Posts: 43

Thanks Friends!!!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
You're welcome I presume you have got it working, then.
 
Don't get me started about those stupid light bulbs.
 
subject: Java / Javac not internal command
 
Similar Threads
Package not found error in JSP
problem with JSP deployment in tomcat
need help in compiling servlet
ActionForm class
HI Friends