AllExperts > Java 
Search      
Java
Volunteer
Answers to thousands of questions
 Home · More Java Questions · Answer Library  · Encyclopedia ·
More Java Answers
Question Library

Ask a question about Java
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Artemus Harper
Expertise
I have a BS in computer science and am working towards a Masters degree.

Experience
I have experience in Core Java, good background in Java swing/gui, some experience with JNI, Java reflection. knowledge of Java bytecode and annotations. Basics in c++ and c#

Education/Credentials
BS in Computer Science at Central Washington University

 
   

You are here:  Experts > Computing/Technology > Focus on Java > Java > javac

Java - javac


Expert: Artemus Harper - 11/6/2009

Question
Hi There. Im currently teaching myself java from different tutorils on the internet. verytime I try compiling any programs in the command promt, I get an error saying "javac is not recognised as an internal or external command, operable program or batch file." what could the problem be here. I tried reinstalling the JDK, but I sill get the same error.am I perhaps using the wrong JDK, if so, what would you suggest?

Thank you very much for your help

Answer
when you install the Java SDK it does not add the compiler to the PATH, only things on the PATH and the current directory can be directly executed. The javac executable is located in program files\JDK<version>\bin folder. You either need to type in that full path, change your current directory to that path, or add the bin directory to your PATH (Computer -> properties -> advanced -> enviromental settings, then edit PATH adding a ; and the path to your java install).

You can also simply download an IDE such as Eclipse or Netbeans and it will handle the compiling itself.

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.