Results 1 to 9 of 9
Like Tree5Likes
  • 1 Post By RamyaSivakanth
  • 1 Post By Tolls
  • 1 Post By makpandian
  • 1 Post By Volc
  • 1 Post By Tolls

Thread: Javac is not recognized

  1. #1
    RAAMsx is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Unhappy Javac is not recognized

    Hello, when trying to compile I get the error 'Javac is not recognized'

    I began with typing this in.

    Java Code:
    cd C:\Users\Quintin\Documents\NetBeansProjects\Hello World App\src\app
    Then I typed

    Java Code:
    dir
    Then I did

    Java Code:
    javac App.java
    And Windows could not find javac so I did

    Java Code:
    C:\Java\jr8\bin\javac App.java
    Now this comes up "'Javac' is not recognized as an internal or external command operable program or batch file"

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    837
    Rep Power
    6

    Default Re: Javac is not recognized

    just check whether javac.exe in your path or not.
    RAAMsx likes this.
    Ramya:cool:

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

    Default Re: Javac is not recognized

    Have you installed a JDK?
    Or only a JRE?
    RAAMsx likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    450
    Rep Power
    6

    Default Re: Javac is not recognized

    C:\Java\jr8\bin\javac App.java
    Indeed, it is not possible. You are trying to execure Java compiler from JRE.

    It must have been like C:\Java\JDK_<<Your Java Version>>\bin\javac App.java
    RAAMsx likes this.
    Mak
    (Living @ Virtual World)

  5. #5
    Volc is offline Member
    Join Date
    Jul 2014
    Posts
    1
    Rep Power
    0

    Default Re: Javac is not recognized

    Quote Originally Posted by makpandian View Post
    Indeed, it is not possible. You are trying to execure Java compiler from JRE.

    It must have been like C:\Java\JDK_<<Your Java Version>>\bin\javac App.java
    Have you added Java to your environment variables? When you open cmd can you type " java -version " and receive a version of Java?

    If not, right click My Computer, click properties, click advanced system settings, environment variables, click "New", then for "Variable Name" type Java, then "Variable Value" type the path to your JDK's bin folder, for example mine is C:\Program Files\Java\jdk1.7.0_55\bin .
    RAAMsx likes this.

  6. #6
    RAAMsx is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Default Re: Javac is not recognized

    I installed this version of JDK [Link]

  7. #7
    RAAMsx is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Default Re: Javac is not recognized

    I uninstalled JDK and reinstalled it in the default location which is
    Java Code:
    C:\Program Files\Java
    then I added the path in the environment variables. and when I put
    Java Code:
    C:\Java\jr8\bin\javac App.java
    into cmd I get this message back 'The system can not find the path'.
    Last edited by RAAMsx; 07-07-2014 at 06:23 AM.

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

    Default Re: Javac is not recognized

    Java Code:
    C:\Program Files\Java
    Java Code:
    C:\Java\jr8\bin\javac App.java
    Spot the difference.

    If you installed Java in "C:\Program Files\Java", then why would you expect to find javac in "C:\Java\jr8\bin"?
    RAAMsx likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #9
    RAAMsx is offline Member
    Join Date
    Jul 2014
    Posts
    4
    Rep Power
    0

    Default Re: Javac is not recognized

    The issues has been fixed. Thank you to every one that helped me solve this

Similar Threads

  1. javac not recognized
    By kris972 in forum New To Java
    Replies: 7
    Last Post: 09-21-2012, 07:11 AM
  2. javac is not recognized
    By double_007 in forum New To Java
    Replies: 10
    Last Post: 09-07-2012, 02:26 AM
  3. 'javac' is not recognized
    By adm in forum New To Java
    Replies: 2
    Last Post: 01-31-2012, 09:24 AM
  4. Javac not recognized
    By OscarLiu in forum New To Java
    Replies: 8
    Last Post: 06-29-2010, 03:10 PM
  5. Javac is not recognized?
    By Java idiot in forum New To Java
    Replies: 4
    Last Post: 08-03-2009, 06:54 PM

Tags for this Thread

Posting Permissions

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