Page 2 of 2 FirstFirst 12
Results 21 to 29 of 29
Like Tree2Likes

Thread: javac is not recognized as an internal or external command error

  1. #21
    Nic32 is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: javac is not recognized as an internal or external command error

    Quote Originally Posted by Norm View Post
    The OS can not find the javac command. You need to add the path to the folder containing the javac.exe file to the PATH environment variable.
    The PATH environment variable is set from the Settings | Control Panel | System panel.
    Select the Advanced tab and
    Click on the Environment variable's button.
    At the bottom in System Variables, find the PATH entry and click the Edit button
    Add the new path using ; to separate it
    Its a stupid small text field so be careful.
    I think I did this, but I am still getting the same error. Here is what my console prints when I type PATH (you asked for this further down when someone was having trouble:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\User>\Documents\Eclipse Programs
    The system cannot find the path specified.

    C:\Users\User>cd C:\\Users\User\Documents\Eclipse Programs

    C:\Users\User\Documents\Eclipse Programs>javac HelloApp.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\User\Documents\Eclipse Programs>javac HelloApp.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\User\Documents\Eclipse Programs>javac HelloApp.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\User\Documents\Eclipse Programs>javac HelloApp.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Users\User\Documents\Eclipse Programs>path
    PATH=C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Windows\System32
    \WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program F
    iles\Intel\DMIX;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WI
    DCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Fi
    les\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\NTRU Cryptosystems
    \NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Softw
    are Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\G
    emalto\Access Client\v5\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLSha
    red\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program
    Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Comm
    on Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\Audio
    Core\;C:\Program Files (x86)\Calibre2\;C:\Program Files\Intel\WiFi\bin\;C:\Progr
    am Files\Common Files\Intel\WirelessCommon\

    C:\Users\User\Documents\Eclipse Programs>
    You can also see the error messages. I kept trying to run the program after doublechecking to be sure I had set the path properly. Any help is appreciated!

    I figure I can start using Eclipse or something instead and possibly bypass this problem, but it seems best to learn how to write from scratch, if that makes sense, but I'm open to suggestions on that as well.

    Edited to add: I just looked over what I pasted, and I do NOT see the path that I set in there. Which leads me to think I did not do so correctly. I will go look at that again.
    Last edited by Nic32; 05-03-2012 at 08:05 PM. Reason: add info at bottom.

  2. #22
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: javac is not recognized as an internal or external command error

    In the PATH variable, where is the path to the JDK's bin folder? That's the location of the javac.exe program.
    If you don't understand my response, don't ignore it, ask a question.

  3. #23
    Nic32 is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: javac is not recognized as an internal or external command error

    I typed this in the System Variable: Path edit box, before everything else that was in there. I put a semi-colon after it:
    C:\Program Files (x86)\Java\jdk1.7.0_03\bin\

    Looking at that, I don't see where I put "User" though, and it seems like that would have to be there. Ugh, I'm feeling way dumb now!

  4. #24
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: javac is not recognized as an internal or external command error

    Does that path show in the long list of paths shown in post#21 when you enter: path in the command prompt window?
    If you don't understand my response, don't ignore it, ask a question.

  5. #25
    Nic32 is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: javac is not recognized as an internal or external command error

    This is pasted from my System Variables: Path textbox:
    C:\Program Files (x86)\Java\jdk1.7.0_03\bin\;%SystemRoot%\system32; %SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROO T%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files\Intel\DMIX;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\AudioCore\;C:\Program Files (x86)\Calibre2\
    This is a repaste of what my command prompt shows when I type "path":
    C:\Users\User\Documents\Eclipse Programs>path
    PATH=C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Windows\System32
    \WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program F
    iles\Intel\DMIX;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WI
    DCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Fi
    les\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\NTRU Cryptosystems
    \NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Softw
    are Stack\bin\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\G
    emalto\Access Client\v5\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLSha
    red\;C:\Program Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program
    Files (x86)\Common Files\Roxio Shared\OEM\DLLShared\;C:\Program Files (x86)\Comm
    on Files\Roxio Shared\OEM\12.0\DLLShared\;C:\Program Files (x86)\Roxio\OEM\Audio
    Core\;C:\Program Files (x86)\Calibre2\;C:\Program Files\Intel\WiFi\bin\;C:\Progr
    am Files\Common Files\Intel\WirelessCommon\
    When I type "path" in the command window, I think it has some of the same stuff that comes up in the User Variables: Path textbox, which I'm also pasting (I added the JDK bin to that one as well b/c I wasn't sure if I was supposed to set the path to user variables or system variables):
    C:\Program Files (x86)\Java\jdk1.7.0_03\bin\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
    So, it looks like "path" when I type it into the command prompt is not going to the right spot?

  6. #26
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default Re: javac is not recognized as an internal or external command error

    Sorry, I have no more to say about it. You know what needs to be done. Its a fight between you and the OS

    I use a batch file or a full path to the compiler when I compile:
    D:\Java\jdk1.6.0_29\bin\javac.exe -Xlint TestCode7.java
    If you don't understand my response, don't ignore it, ask a question.

  7. #27
    Nic32 is offline Member
    Join Date
    May 2012
    Posts
    4
    Rep Power
    0

    Default Re: javac is not recognized as an internal or external command error

    Cool, thanks Norm. :)

  8. #28
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,838
    Rep Power
    19

    Default Re: javac is not recognized as an internal or external command error

    You need to close your command terminal and reopen it.
    It only loads the PATH values when it starts up, so any changes after you have started it will not appear.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #29
    xman is offline Member
    Join Date
    Jun 2012
    Posts
    1
    Rep Power
    0

    Default Re: javac is not recognized as an internal or external command error

    Quote Originally Posted by Tolls View Post
    You need to close your command terminal and reopen it.
    It only loads the PATH values when it starts up, so any changes after you have started it will not appear.
    I am not a Java expert but I had the same issue and found this thread when trying to get help. Then I found this is the fix: in the "Environment Variables" dialog box, trying to edit the PATH variable in the lower portion labeled as "System variables" instead of the upper portion labeled as "User variables for xxxx". Or edit PATH for both portion just to make sure. That fixes my puzzle!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 25
    Last Post: 06-23-2012, 11:30 AM
  2. Replies: 19
    Last Post: 11-27-2010, 12:31 AM
  3. Replies: 28
    Last Post: 10-26-2010, 04:39 AM
  4. Replies: 13
    Last Post: 09-17-2009, 07:56 AM
  5. 'javac' is not recognized as an internal or external command
    By sam_1032002@btopenworld.c in forum New To Java
    Replies: 3
    Last Post: 10-18-2008, 02:40 AM

Posting Permissions

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