Hello friends! Complete newby with initial question: javac not recognized. Thank you
Hello, friends! Please kindly note that I'm a complete newby to Java, having just completed my first tasks of downloading the Java 6, 32-bit program and the IDE Eclipse. I also ran my first program, HelloWorld through the IDE, which worked out well. However, when I go to the command line (and not the IDE) and type in "javac HelloWorld.java", javac doesn't seem to be recognized. I receive the error message "javac is not recognized as an internal or external command, operable program . . .
Does this mean that I will need to reload Java 6? The code seems to work fine on the IDE called Eclipse. Any or all advice would be very welcome. Please forgive me for bringing up this question in the introduction if this is not the place for such a query.
To get back to the introduction, I hold a Master of Arts degree, but have no educational background in Comp Sci. I am enrolled in the Comp Sci program at Athabasca University, anticipating my first programming class in Java in the winter semester by currently learning it through lynda.com's beginner tutorials.
Recently, I have delved into PHP with the hopes of gaining skills in Web programming. I read PHP about four hours a day every day, although I'm a little afraid of actually working with the code on my system. Fortunately, I have recently download XAMPP and am getting started with the programming, which I love! I'm new to downloading files, having spent a great deal of money on Future Shop's IT personnel in order to have them download software for me, so I'm a little apprehensive about the download process.
As for hobbies, I love practicing Muay Thai martial arts, reading non-fiction (computer instructional, spiritual (hence "angelsonearth"), and motivational books), learning grammar, learning Web design and Photoshop, making video clips, and engaging in random acts of kindness.
I am so grateful to all of you for helping provide feedback and interesting commentary!
Friends, thank you so much for your kindness and conscientiousness! May the best of the world be there for you always--and may your karma for helping out others be returned to you tenfold!
Re: Hello friends! Complete newby with initial question: javac not recognized. Thank
You do not have to reinstall the JDK.
Quote:
javac is not recognized as an internal or external command
That message is from the operating system saying it can not find javac. The OS will look in the current folder and on the paths listed in the PATH environment variable for the command.
You can tell the OS where javac is by using the full path to the command, for example on my system:
D:\Java\jdk1.6.0_29\bin\javac.exe <Java source file>
or by adding the path to the bin folder that contains the javac.exe file to the PATH environment variable.
Re: Hello friends! Complete newby with initial question: javac not recognized. Thank
Quote:
Originally Posted by
Norm
You do not have to reinstall the JDK.
That message is from the operating system saying it can not find javac. The OS will look in the current folder and on the paths listed in the PATH environment variable for the command.
You can tell the OS where javac is by using the full path to the command, for example on my system:
D:\Java\jdk1.6.0_29\bin\javac.exe <Java source file>
or by adding the path to the bin folder that contains the javac.exe file to the PATH environment variable.
You are absolutely wonderful, Norm! I didn't set the PATH environment variable, which I'm now going to do in order to ensure that it's properly read. Plus, providing the full path will be very useful in the meantime! Kudos to you, Norm!
I'd like to thank you through the system so that it registers for you on your thank you tally, but I'm not sure how! Please be so very kind as to advise!
Re: Hello friends! Complete newby with initial question: javac not recognized. Thank
Your kind words are sufficient. I don't keep score.
You could also write a batch file with the full path to javac and an arg for the source filename or you could hardcode the filename for now.
Re: Hello friends! Complete newby with initial question: javac not recognized. Thank
Norm, you are terrific! Thank you! I'm hesitant to change the path environment variable because I am also using the command line for the mysql client, and I fear that changing the path environment so that it's ready for Java might interfere with the command line for mysql. Is that the case?
I'm also hesitant about changing the path environment variable because I'm not sure how to reset it if I make an error or if I download a later version of Java (Java 7) later on.
Also, I have no idea of what a batch file is, although I'm very excited about learning how to create one. In the meantime, I'll hardcode the filename. Thank you so very much, friend! Your advice is greatly appreciated and has made my entry into Java very positive, indeed!