Results 1 to 11 of 11
Like Tree1Likes
  • 1 Post By DarrylBurke

Thread: javac is not recognized

  1. #1
    double_007 is offline Member
    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    0

    Default javac is not recognized

    I am taking an online course which requires that I set up a user variable within the environment variables called Path. The online teacher assumes that a user variable already exists called Path. It does not so I created it.

    D:\DProgram Files\Java\jdk1.7.0_07\bin;

    The teacher sought to have me edit the existing Path variable and that it would be a reference to Program Files on my C: drive. I have little to no space on that drive so I downloaded it to my D: drive and yes the name of the folder is DProgram Files and the path is as stated above.

    I my dos prompt where i am running as follows:d:\New Folder\My Documents\java>javac HelloWorld.javac

    I am getting this message of "javac" is not recognized as an internal or external command , operable program or batch file.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: javac is not recognized

    To check the value of the PATH environment variable, open command prompt window and enter: SET
    the values of all the env vars will be displayed. Check that Path is correct.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    CodeMonkeyAlx is offline Member
    Join Date
    Aug 2012
    Posts
    13
    Rep Power
    0

    Default Re: javac is not recognized

    I had this issue in Linux, mine was more or less that javac was not installed even though I supposedly had everything I needed at that point.

  4. #4
    double_007 is offline Member
    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    0

    Default Re: javac is not recognized

    I did as you said and this is what displayed: d:\DProgram Files\Java\Jdk.1.7.0_07/bin;

    This is interesting because this is a copy of what is in the user variable path D:\DProgram Files\Java\jdk1.7.0_07\bin;
    This is a copy and paste. As you can see there sre three differences:

    (a) drive is lower case from the path statement I followed in DOS
    (b) jdk first letter "j" is lower case in the path statement from DOS
    (c) and bin has a back slash instead of a forward slash

    Please advise.

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: javac is not recognized

    Not sure what you are describing. Can you copy the response from the SET command and paste it here.

    To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The selection will show
    Click in upper left again
    Select Edit and click 'Copy'

    Paste here.


    Try reEntering the PATH variable.
    If you don't understand my response, don't ignore it, ask a question.

  6. #6
    double_007 is offline Member
    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    0

    Default Re: javac is not recognized

    Microsoft Windows [Version 6.0.6002]
    Copyright (c) 2006 Microsoft Corporation. All rights reserved.

    C:\Windows\system32>d:\New Folder\documents\
    'd:\New' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Windows\system32>d:\
    'd:\' is not recognized as an internal or external command,
    operable program or batch file.

    C:\Windows\system32>d:

    D:\>New Folder\My Documents
    'New' is not recognized as an internal or external command,
    operable program or batch file.

    D:\>\new folder
    '\new' is not recognized as an internal or external command,
    operable program or batch file.

    D:\>new folder
    'new' is not recognized as an internal or external command,
    operable program or batch file.

    D:\>dir
    Volume in drive D has no label.
    Volume Serial Number is 086F-8BC7

    Directory of D:\

    02/21/2012 12:19 PM <DIR> 100_FUJI
    04/26/2008 01:54 PM <DIR> Build and Rebuild
    09/04/2012 12:52 AM <DIR> DProgram Files
    06/09/2009 12:40 PM 2,130,088 flashplayer_10_ax_debug.exe
    09/25/2011 08:00 PM <DIR> MSI3159c.tmp
    09/24/2011 08:30 PM <DIR> MSI82f3a.tmp
    09/24/2011 04:32 PM <DIR> MSIc67bc.tmp
    09/04/2012 12:57 AM <DIR> New Folder
    1 File(s) 2,130,088 bytes
    7 Dir(s) 258,094,059,520 bytes free

    D:\>New Folder
    'New' is not recognized as an internal or external command,
    operable program or batch file.

    D:\>\New Folder\My Documents\
    '\New' is not recognized as an internal or external command,
    operable program or batch file.

    D:\>\
    '\' is not recognized as an internal or external command,
    operable program or batch file.

    D:\>cd
    D:\

    D:\>New Folder\
    'New' is not recognized as an internal or external command,
    operable program or batch file.

    D:\>dir
    Volume in drive D has no label.
    Volume Serial Number is 086F-8BC7

    Directory of D:\

    02/21/2012 12:19 PM <DIR> 100_FUJI
    04/26/2008 01:54 PM <DIR> Build and Rebuild
    09/04/2012 12:52 AM <DIR> DProgram Files
    06/09/2009 12:40 PM 2,130,088 flashplayer_10_ax_debug.exe
    09/25/2011 08:00 PM <DIR> MSI3159c.tmp
    09/24/2011 08:30 PM <DIR> MSI82f3a.tmp
    09/24/2011 04:32 PM <DIR> MSIc67bc.tmp
    09/04/2012 12:57 AM <DIR> New Folder
    1 File(s) 2,130,088 bytes
    7 Dir(s) 258,094,059,520 bytes free

    D:\>cd New Folder\My Documents

    D:\New Folder\My Documents>md java

    D:\New Folder\My Documents>cd java

    D:\New Folder\My Documents\java>notepad HelloWorld.java

    D:\New Folder\My Documents\java>javac HellowWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>javac HelloWorld.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    D:\New Folder\My Documents\java>set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\double_007\AppData\Roaming
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=DOUBLE_007-PC
    ComSpec=C:\Windows\system32\cmd.exe
    configsetroot=C:\Windows\ConfigSetRoot
    CW_UPDATE=Y
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\double_007
    iHA_Version=1.00.00
    LenovoTestLogFile=d:\test\wintest\..\datetime.dat
    LenovoTestPath=d:\test\wintest\
    LOCALAPPDATA=C:\Users\double_007\AppData\Local
    LOGONSERVER=\\DOUBLE_007-PC
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\Windows\system32;C:\Windows;C:\Windows\Sys tem32\Wbem;C:\Program Files\In
    tel\DMIX;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\C
    ommon Files\HP\Digital Imaging\\bin;C:\Windows\System32\WindowsPowerShell \v1.0\;
    d:\DProgram Files\Java\Jdk.1.7.0_07/bin;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 2, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0f02
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\Windows\system32\WindowsPowerShell \v1.0\Modules\
    PUBLIC=C:\Users\Public
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\DOUBLE~1\AppData\Local\Temp
    TMP=C:\Users\DOUBLE~1\AppData\Local\Temp
    USERDOMAIN=double_007-PC
    USERNAME=double_007
    USERPROFILE=C:\Users\double_007
    windir=C:\Windows

    D:\New Folder\My Documents\java>/

  7. #7
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: javac is not recognized

    Did you try editing the PATH variable to correct what you saw as possible errors?
    If you don't understand my response, don't ignore it, ask a question.

  8. #8
    double_007 is offline Member
    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    0

    Default Re: javac is not recognized

    I also re-entered it as you requested and I copied just the part that was modified after I did the "SET" command

    d:\DProgram Files\Java\Jdk.1.7.0_07/bin;

    Here is what I entered in the user environment:

    D:\DProgram Files\Java\jdk1.7.0_07\bin;

    I noticed that the drive designation is lower case and it is back slashed again just before "bin"

  9. #9
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: javac is not recognized

    Sorry, I have no idea what your problem is. Is the OS changing the values you are entering when you edit the Path?

    Try doing it in small steps. Enter a little, display it with SET, enter some more and display it again.
    If you don't understand my response, don't ignore it, ask a question.

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default Re: javac is not recognized

    Quote Originally Posted by double_007 View Post
    ... I downloaded it to my D: drive and yes the name of the folder is DProgram Files and the path is as stated above.
    Where you saved the downloaded file is irrelevant. Did you install the JDK?

    db
    Norm likes this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default Re: javac is not recognized

    Is there a file named javac.exe in the bin folder pointed to by the path?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. 'javac' is not recognized
    By adm in forum New To Java
    Replies: 2
    Last Post: 01-31-2012, 10:24 AM
  2. javac is not recognized command...
    By javastudent87 in forum New To Java
    Replies: 6
    Last Post: 07-30-2010, 06:50 AM
  3. Javac not recognized
    By OscarLiu in forum New To Java
    Replies: 8
    Last Post: 06-29-2010, 04:10 PM
  4. Javac is not recognized?
    By Java idiot in forum New To Java
    Replies: 4
    Last Post: 08-03-2009, 07:54 PM
  5. javac command not recognized
    By sunshine39 in forum New To Java
    Replies: 7
    Last Post: 03-04-2009, 04:54 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
  •