Results 1 to 4 of 4
  1. #1
    JavaLady is offline Member
    Join Date
    Aug 2011
    Posts
    2
    Rep Power
    0

    Default Yet another question on Javac not recognized - Env Variables already set

    Ok, so I have looked at so many posts I am afraid I am going to get my computer confused. Maybe some other eyes will help.
    Running XP on 64 BIT HP Elitebook.
    1. Downloaded JDK 1.6.0_03
    2. Located my installation in C:\Program Files\Java\jdk1.6.0_03\bin
    3. Both java.exe and javac.exe exist at the above path
    4. Went to Environmental Variables (here is where the various posts start to differ)
    A. In System Variables, PATH already existed, but, was "Path". Changed to "PATH" and added jdk path. C:\Program Files\Nice Systems\NICE Player Codec Pack\;C:\Program Files\FileNET\Shared\;C:\Program Files\FileNET\;C:\Program Files\IBM\SQLLIB\SAMPLES\REPL;C:\Program Files\IBM\SQLLIB\FUNCTION;C:\Program Files\IBM\SQLLIB\BIN;C:\Program Files\Fidelity\Security Configuration;C:\Program Files\Oracle\jre\1.1.8\bin\;C:\Program Files\Oracle\jre\1.3.1\bin\;C:\WINDOWS\system32;C: \WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Utimaco\SafeGuard Easy\;C:\Program Files\NetManage\Windows;C:\Sybase\DLL;C:\Sybase\BI N;C:\oracle\ora92\bin\;C:\Program Files\Fidelity\Autoruns;C:\Program Files\FNSW\CLIENT\BIN\;C:\Program Files\FNSW\CLIENT\SHOBJ\;C:\Program Files\FNSW\CLIENT\BIN;C:\Program Files\FNSW\CLIENT\SHOBJ;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jdk1.6.0_03\bin
    B. In System Variables CLASSPATH did not exist. Added it. C:\Program Files\Java\jre1.6.0.23\lib\ext\QTJava.zip;C:\Progr am Files\Java\jdk1.6.0_03\bin
    C. In User Variables PATH already existed as "PATH". Added the JDK path. C:\FASM;C:\ORANT\BIN;C:\PROGRA~1\FESXTRAC\BIN;C:\P ROGRAM FILES\FASM;C:\Program Files\Java\jdk1.6.0_03\bin
    D. In User Variables CLASSPATH did not exist. Added it. C:\Program Files\Java\jdk1.6.0_03\bin
    5. At CMD prompt ran C:\>C:\autoexec.bat. Goes back to the prompt. Any message supposed to be here?
    6. At CMD prompt ran C:\>java -version. Only information for JRE displays
    7. Run C:>javac, got the 'javac is not recognized as an internal or external command..." message.

    Yet another question on Javac not recognized - Env Variables already set-java.gif
    Yet another question on Javac not recognized - Env Variables already set-autoexec.gif
    Any ideas?
    Last edited by JavaLady; 08-06-2011 at 05:22 AM. Reason: Left of operating system info and added 2nd screenshot

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Unless you want a CLASSPATH variable to be set for some reason delete it.

    The PATH variable is useful as mentioned as #1 in the "Common Problems" page of Oracle's Tutorial. The JDK installations they refer to there are here. Note point 4 "Update the PATH variable (Optional)". The instructions given there are good (and they don't involve running autoexec.bat).

    (Note the comment made there about how the PATH is read from the left so that duplicate entries will result in only the leftmost one being effective. They make this point with respect to the jdk bin directory but it is valid also for the jre bin directories which you have included twice. As it stands you are always going to get the leftmost - oldest - java.exe, which probably not the one you want.)

    You can use the

    Java Code:
    C:\>path
    command to see what the setting of your PATH variable is, and

    Java Code:
    C:\>dir <path to jdk\bin>
    to see if javac.exe exists where it should be.

    If you continue to get "'javac' is not recognised...", copy and post those two commands and their associated output. (As text, please.)
    Last edited by pbrockway2; 08-06-2011 at 05:50 AM.

  3. #3
    JavaLady is offline Member
    Join Date
    Aug 2011
    Posts
    2
    Rep Power
    0

    Default

    I have it figured out.
    I did remove the CLASSPATH, not sure if that is what the fix was though.
    I went back to CMD and tried "path" but the path did not display. It was in the Environmental Variable windows though.
    What was needed, on my machine at least, was a restart. Running autoexec.bat gave no results.
    So now, when I run "path" at CMD prompt, the path actually does show up.

    Thanks for taking the time to read and assist.

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    What was needed, on my machine at least, was a restart.
    You're welcome. Glad you've got it configured correctly.

    Typically opening up a new cmd window after changing a variable is enough. But who knows... Removing CLASSPATH wasn't the fix, but is a good idea anyway.

Similar Threads

  1. 'javac' is not recognized as an internal command
    By Infected_ in forum New To Java
    Replies: 3
    Last Post: 10-18-2010, 03:04 AM
  2. javac is not recognized command...
    By javastudent87 in forum New To Java
    Replies: 6
    Last Post: 07-30-2010, 05:50 AM
  3. Javac not recognized
    By OscarLiu in forum New To Java
    Replies: 8
    Last Post: 06-29-2010, 03:10 PM
  4. Javac is not recognized?
    By Java idiot in forum New To Java
    Replies: 4
    Last Post: 08-03-2009, 06:54 PM
  5. javac command not recognized
    By sunshine39 in forum New To Java
    Replies: 7
    Last Post: 03-04-2009, 03:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •