Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By kkid

Thread: javac not recognised as an internal or external command

  1. #1
    kkid is offline Senior Member
    Join Date
    Jul 2012
    Posts
    241
    Rep Power
    3

    Default javac not recognised as an internal or external command

    I had this problem before but I managed to get it to work. I have since wiped my computer and re-installed the JDK and have this issue again.

    java is recognised as a command (if I type it, the options appear).
    javac comes up with the error in the title.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,183
    Rep Power
    20

    Default Re: javac not recognised as an internal or external command

    Are you sure you installed a JDK and not a JRE?
    If so then you'll need to manually edit the PATH environment variable. This should have been done by the installation, TBH.
    You'll need to add the path to the JDK bin directory.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    kkid is offline Senior Member
    Join Date
    Jul 2012
    Posts
    241
    Rep Power
    3

    Default Re: javac not recognised as an internal or external command

    Quote Originally Posted by Tolls View Post
    Are you sure you installed a JDK and not a JRE?
    If so then you'll need to manually edit the PATH environment variable. This should have been done by the installation, TBH.
    You'll need to add the path to the JDK bin directory.
    Yes, I have installed the JDK. I know for sure as in the bin folder, I have javac.exe which I can use to compile files if I drag them onto it.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: javac not recognised as an internal or external command

    You have not addressed Tolls' comment about adding the bin directory to the system path. This is necessary for success.

  5. #5
    kkid is offline Senior Member
    Join Date
    Jul 2012
    Posts
    241
    Rep Power
    3

    Default Re: javac not recognised as an internal or external command

    I forgot to add it to PATH, i couldn't find which environment variable I was meant to use. I came across websites telling me to create "lib" variables and psoting the path in there and all other sorts of variable. Thanks for the help, it works now.
    Fubarable likes this.

Similar Threads

  1. Replies: 9
    Last Post: 06-27-2012, 10:31 AM
  2. Replies: 19
    Last Post: 04-10-2012, 11:34 AM
  3. Replies: 1
    Last Post: 10-17-2011, 12:15 AM
  4. Replies: 28
    Last Post: 10-26-2010, 05: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, 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
  •