Results 1 to 4 of 4
  1. #1
    Arcturus is offline Member
    Join Date
    Sep 2015
    Posts
    4
    Rep Power
    0

    Question All of a sudden "javac is not recognized as an internal or external command.."

    Everything worked fine until I closed CMD and opened up later, I could compile totally fine before, now I can't and i get the above message. I've done "cd pathtofileyouwantcompiled" then typed "javac filename", that's where I get the message stated in the title. It's obviously worth mentioning that I am new to java and dont yet know all too much about it, so I'm sure theres something very basic I'm missing. I have set the path to JDK through "enviornment variables", so that's already something I know isnt the cause.

    Thanks in advance to anyone taking the time to reply.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: All of a sudden "javac is not recognized as an internal or external command.."

    You get that message because the OS can not find the javac.exe file on any of the paths it looks on.
    You need to:
    either change the PATH environment variable to point to the folder with the javac.exe file
    or use the full path to the command, like the following:
    D:\Java\jdk1.8.0_25\bin\javac.exe -cp . -Xlint TestCode21.java
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Arcturus is offline Member
    Join Date
    Sep 2015
    Posts
    4
    Rep Power
    0

    Default Re: All of a sudden "javac is not recognized as an internal or external command.."

    Thanks, it was a path issue which is pretty obvious to me now. Ashame i even had to post, really, but now I know, thanks Norm.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: All of a sudden "javac is not recognized as an internal or external command.."

    Glad you got it figured out.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 25
    Last Post: 06-23-2012, 11:30 AM
  2. Replies: 12
    Last Post: 01-28-2012, 05:24 PM
  3. Replies: 1
    Last Post: 10-16-2011, 11:15 PM
  4. Replies: 28
    Last Post: 10-26-2010, 04:39 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
  •