Results 1 to 13 of 13
  1. #1
    bmw2085 is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default ‘javac’ is not recognized as an internal or external command help

    I type "javac Test.java" .It said " ‘javac’ is not recognized as an internal or external command".When i type java Test,it worked.What happen is that?

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default Re: ‘javac’ is not recognized as an internal or external command help

    you must add the directory containing the java.exe and javac.exe (..\bin) to your PATH environment variable.

  3. #3
    bmw2085 is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: ‘javac’ is not recognized as an internal or external command help

    Quote Originally Posted by j2me64 View Post
    you must add the directory containing the java.exe and javac.exe (..\bin) to your PATH environment variable.
    Where is path environment variable i can add it?

  4. #4
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default Re: ‘javac’ is not recognized as an internal or external command help

    which operating system are you using?

    for windows 7 os look here: http://geekswithblogs.net/renso/arch...windows-7.aspx

    for linux look here: http://nixcraft.com/getting-started-...your-path.html
    Last edited by j2me64; 01-28-2012 at 12:35 AM.

  5. #5
    bmw2085 is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: ‘javac’ is not recognized as an internal or external command help

    I'm using windows 7.When i click on New tab,what do i type on Variable name and Variable value?
    Last edited by bmw2085; 01-28-2012 at 12:49 AM.

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

    Default Re: ‘javac’ is not recognized as an internal or external command help

    When i click on New tab
    What program are you executing?

  7. #7
    bmw2085 is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: ‘javac’ is not recognized as an internal or external command help

    Quote Originally Posted by Norm View Post
    What program are you executing?
    i went to set environment variables.

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,407
    Rep Power
    20

    Default Re: ‘javac’ is not recognized as an internal or external command help

    Have you installed the JDK or only the JRE?

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

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,407
    Rep Power
    20

    Default Re: ‘javac’ is not recognized as an internal or external command help

    Quote Originally Posted by j2me64 View Post
    which operating system are you using?

    for windows 7 os look here: How to set the windows path in Windows 7

    for linux look here: Linux / UNIX: Adding a Directory to Your Path
    Or for both on one page, go through Lesson: Common Problems (and Their Solutions) (The Java™ Tutorials > Getting Started)

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

  10. #10
    bmw2085 is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: ‘javac’ is not recognized as an internal or external command help

    Now i run javac ok now but i type " java Test".It said " exception in thread main java.lang.noclassdeffounderror ".How to create classpath and class for Java.I run my file from external hard drive.

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

    Default Re: ‘javac’ is not recognized as an internal or external command help

    What is the full text of the error message. It has important info that you have left off.

    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.
    Last edited by Norm; 01-28-2012 at 06:04 PM.

  12. #12
    bmw2085 is offline Member
    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0

    Default Re: ‘javac’ is not recognized as an internal or external command help

    this's pic -pic-1.png

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

    Default Re: ‘javac’ is not recognized as an internal or external command help

    What is the full text of the error message. It has important info that you have left off.
    I can't copy and paste from an image.

    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.
    Last edited by Norm; 01-28-2012 at 06:05 PM.

Similar Threads

  1. Replies: 25
    Last Post: 06-23-2012, 11:30 AM
  2. Replies: 28
    Last Post: 06-10-2012, 03:48 AM
  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
  •