Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Hello friends! Complete newby with initial question: javac not recognized. Thank you

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default 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!


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Hello friends! Complete newby with initial question: javac not recognized. Thank

    You do not have to reinstall the JDK.
    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.
    Last edited by Norm; August 17th, 2012 at 04:01 PM.
    If you don't understand my answer, don't ignore it, ask a question.

  3. The Following User Says Thank You to Norm For This Useful Post:

    angelsonearth (August 17th, 2012)

  4. #3
    Junior Member
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Hello friends! Complete newby with initial question: javac not recognized. Thank

    Quote Originally Posted by Norm View Post
    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!

  5. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default 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.
    If you don't understand my answer, don't ignore it, ask a question.

  6. The Following User Says Thank You to Norm For This Useful Post:

    angelsonearth (August 19th, 2012)

  7. #5
    Junior Member
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default 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!

Similar Threads

  1. newby Questions - indexOf help with an ArrayList
    By Bially in forum What's Wrong With My Code?
    Replies: 5
    Last Post: September 20th, 2011, 06:05 PM
  2. ArrayList initial capacity problem (Index out of bounds Exception)
    By chronoz13 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: June 20th, 2011, 11:24 AM
  3. A little help need to complete my tutorial question
    By hengchuen in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 17th, 2011, 07:51 AM
  4. How to set initial balance of savings account?
    By Punky0214 in forum Java Theory & Questions
    Replies: 0
    Last Post: November 17th, 2010, 10:00 PM
  5. Newby Question
    By javabob in forum Java Theory & Questions
    Replies: 1
    Last Post: November 16th, 2009, 10:09 AM

Tags for this Thread