Results 1 to 11 of 11
Like Tree2Likes
  • 1 Post By JosAH
  • 1 Post By Norris80

Thread: 'javac' is not recognized as an internal or external command, operable program..

  1. #1
    Norris80 is offline Member
    Join Date
    Feb 2012
    Posts
    12
    Rep Power
    0

    Default 'javac' is not recognized as an internal or external command, operable program..

    It is set in my path directory, here it is copy and pasted,

    C:\Users\Trevor>path
    PATH=C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bi
    n\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Fil
    es (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDI
    A Corporation\PhysX\Common;C:\Windows\system32;C:\Wi ndows;C:\Windows\System32\Wb
    em;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ Program Files (x86)\Windows Li
    ve\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static; C:\Progra
    m Files (x86)\Java\jdk1.7.0_02\bin;

    Please Help with why I am receiving this error

  2. #2
    Norris80 is offline Member
    Join Date
    Feb 2012
    Posts
    12
    Rep Power
    0

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    In addition, I can navigate using cd to the bin folder, and type in javac and it will print out..

    C:\Program Files (x86)\Java\jdk1.7.0_02\bin>javac
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are u
    sed
    -classpath <path> Specify where to find user class files and annotati
    on processors
    -cp <path> Specify where to find user class files and annotati
    on processors
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -proc:{none,only} Control whether annotation processing and/or compil
    ation is done.
    -processor <class1>[,<class2>,<class3>...] Names of the annotation processors
    to run; bypasses default discovery process
    -processorpath <path> Specify where to find annotation processors
    -d <directory> Specify where to place generated class files
    -s <directory> Specify where to place generated source files
    -implicit:{none,class} Specify whether or not to generate class files for
    implicitly referenced files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release

    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -Akey[=value] Options to pass to annotation processors
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system
    -Werror Terminate compilation if warnings occur
    @<filename> Read options and filenames from file

  3. #3
    Norris80 is offline Member
    Join Date
    Feb 2012
    Posts
    12
    Rep Power
    0

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    javac Project0.java works when the java file is in the bin folder, but not outside...

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,777
    Blog Entries
    7
    Rep Power
    21

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    Try to get rid of the space before the "C:" in your path variable and get rid of the trailing semi colon as well. See if it helps ...

    kind regards,

    Jos
    Husseydx likes this.
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    Norris80 is offline Member
    Join Date
    Feb 2012
    Posts
    12
    Rep Power
    0

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    Quote Originally Posted by JosAH View Post
    Try to get rid of the space before the "C:" in your path variable and get rid of the trailing semi colon as well. See if it helps ...

    kind regards,

    Jos
    It is working now, I believe the space is what was doing it, I had it before without the semicolon, and it wasn't working, must've been the space, thanks so much!
    Husseydx likes this.

  6. #6
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,777
    Blog Entries
    7
    Rep Power
    21

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    You're welcome of course; I'm glad it works now.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    paulomi is offline Member
    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    I tried doing that too.. but this same error shows to me...i tried installing the setup jdk 7 on my windows xp but still after installing and running the setup when i go to the comand prompt and try to compile java, it shows 'javac' is not recognized as an internal or external comand..
    Please help me out!

  8. #8
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,777
    Blog Entries
    7
    Rep Power
    21

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    It's always the same: if javac.exe is stored in directory 'X', add 'X' to your path environment variable. If it still doesn't work, javac.exe isn't stored in directory 'X' or you have incorrectly set the path variable.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    Husseydx is offline Member
    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    Thank you, It really helped me too

  10. #10
    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    I have set the path correctly and still it is not working , is there any other way to solve this problem?
    "javac' is not recognized as an internal or external command, operable program.."

  11. #11
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,777
    Blog Entries
    7
    Rep Power
    21

    Default Re: 'javac' is not recognized as an internal or external command, operable program..

    Quote Originally Posted by Javalearner101 View Post
    I have set the path correctly and still it is not working , is there any other way to solve this problem?
    "javac' is not recognized as an internal or external command, operable program.."
    No matter what you say, you haven't set the path variable correctly; it should contain the directory where that javac.exe file is stored. Case matters, no additional spaces, no typos etc.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 12
    Last Post: 01-28-2012, 06:24 PM
  2. Replies: 13
    Last Post: 12-31-2010, 02:36 AM
  3. Replies: 28
    Last Post: 10-26-2010, 05:39 AM
  4. Replies: 8
    Last Post: 11-18-2008, 10:21 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, 03: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
  •