• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Java / Javac not internal command

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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;
 
Marshal
Posts: 74044
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks Friends!!!
 
Campbell Ritchie
Marshal
Posts: 74044
332
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome I presume you have got it working, then.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic