Meaningless Drivel is fun!*
The moose likes Beginning Java and the fly likes 'javac' is not recognized Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark " Watch " New topic
Author

'javac' is not recognized

Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

when i try to compile from the command line the prompt says that javac is not recognized as an internal or external command, even though I can compile in eclipse.


Jesus lives
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Javac is a executable. You need it to be on your PATH, otherwise the operating system doesn't know where to look for it.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ajay Joseph
Greenhorn

Joined: Nov 04, 2004
Posts: 21
When you run it in Command window you must set the path to the java where you have installed it.

if the Java in your system is jdk1.2.2(for eg) and is in D drive....

in the command window set path using this command

set path=D:\jdk1.2.2\bin

the bin path should be specified like this...

Ajay
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Read the installation notes for the JDK, especially step 5 (Update the PATH variable).

Follow the steps in Sun's Getting Started tutorial. It explains what the error means.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

working fine now!
cheers
Bobby McFarlen
Greenhorn

Joined: Jul 08, 2006
Posts: 1
thank you soooooo very much kind sir. me before this post: me now:
[ July 08, 2006: Message edited by: Bobby McFarlen ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 'javac' is not recognized
 
Similar Threads
Javac Question
How do i set a/the classpath.
'JAVAC' is not recognized
please ..i need help!
can't start compiler