javac command not working in command prompt

Discussion in 'Java' started by chrisdude911, Sep 1, 2006.

  1. chrisdude911

    chrisdude911 Guest

    chrisdude911, Sep 1, 2006
    #1
    1. Advertising

  2. chrisdude911

    chrisdude911 Guest

    I will try JDK 5.0 Update 8 later when the site so busy that i cannot
    download it
    chrisdude911 wrote:
    > Hi guys,
    > I have just installed SDK 1.4.2 and i am following the
    > http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    > tourial.
    > I tried installing version JDK 6 beta 2 but the javac command in
    > command prompt did not work, i still have the same problem with SDK
    > 1.4.2
    > Can anyone help?
    > Thanks
    > Chris
    chrisdude911, Sep 1, 2006
    #2
    1. Advertising

  3. chrisdude911

    chrisdude911 Guest

    That didn't work
    chrisdude911 wrote:
    > I will try JDK 5.0 Update 8 later when the site so busy that i cannot
    > download it
    > chrisdude911 wrote:
    > > Hi guys,
    > > I have just installed SDK 1.4.2 and i am following the
    > > http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    > > tourial.
    > > I tried installing version JDK 6 beta 2 but the javac command in
    > > command prompt did not work, i still have the same problem with SDK
    > > 1.4.2
    > > Can anyone help?
    > > Thanks
    > > Chris
    chrisdude911, Sep 1, 2006
    #3
  4. chrisdude911 wrote:
    > That didn't work
    > chrisdude911 wrote:
    >> I will try JDK 5.0 Update 8 later when the site so busy that i cannot
    >> download it
    >> chrisdude911 wrote:
    >>> Hi guys,
    >>> I have just installed SDK 1.4.2 and i am following the
    >>> http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    >>> tourial.
    >>> I tried installing version JDK 6 beta 2 but the javac command in
    >>> command prompt did not work, i still have the same problem with SDK
    >>> 1.4.2
    >>> Can anyone help?
    >>> Thanks
    >>> Chris

    >

    What do you mean, 'does not work'? Are you getting compile errors, file
    not found errors or something else? What platform are you on?

    If you're running on Windows and are getting: 'javac' is not recognized
    as an internal or external command, operable program or batch file.'
    Then it's most likely a path issue.

    --
    TechBookReport Java http://www.techbookreport.com/JavaIndex.html
    TechBookReport, Sep 1, 2006
    #4
  5. chrisdude911

    chrisdude911 Guest

    C:\Java>javac HelloWorldApp.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.

    that is the message, i have put C:\Program
    Files\JAVA\jdk1.5.0_08\bin\javac into the PATH but it is still not
    working

    TechBookReport wrote:
    > chrisdude911 wrote:
    > > That didn't work
    > > chrisdude911 wrote:
    > >> I will try JDK 5.0 Update 8 later when the site so busy that i cannot
    > >> download it
    > >> chrisdude911 wrote:
    > >>> Hi guys,
    > >>> I have just installed SDK 1.4.2 and i am following the
    > >>> http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    > >>> tourial.
    > >>> I tried installing version JDK 6 beta 2 but the javac command in
    > >>> command prompt did not work, i still have the same problem with SDK
    > >>> 1.4.2
    > >>> Can anyone help?
    > >>> Thanks
    > >>> Chris

    > >

    > What do you mean, 'does not work'? Are you getting compile errors, file
    > not found errors or something else? What platform are you on?
    >
    > If you're running on Windows and are getting: 'javac' is not recognized
    > as an internal or external command, operable program or batch file.'
    > Then it's most likely a path issue.
    >
    > --
    > TechBookReport Java http://www.techbookreport.com/JavaIndex.html
    chrisdude911, Sep 1, 2006
    #5
  6. chrisdude911

    chrisdude911 Guest

    i also tried C:\Program Files\Java\jdk1.5.0_08\bin\
    and that didn't work
    chrisdude911 wrote:
    > C:\Java>javac HelloWorldApp.java
    > 'javac' is not recognized as an internal or external command,
    > operable program or batch file.
    >
    > that is the message, i have put C:\Program
    > Files\JAVA\jdk1.5.0_08\bin\javac into the PATH but it is still not
    > working
    >
    > TechBookReport wrote:
    > > chrisdude911 wrote:
    > > > That didn't work
    > > > chrisdude911 wrote:
    > > >> I will try JDK 5.0 Update 8 later when the site so busy that i cannot
    > > >> download it
    > > >> chrisdude911 wrote:
    > > >>> Hi guys,
    > > >>> I have just installed SDK 1.4.2 and i am following the
    > > >>> http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    > > >>> tourial.
    > > >>> I tried installing version JDK 6 beta 2 but the javac command in
    > > >>> command prompt did not work, i still have the same problem with SDK
    > > >>> 1.4.2
    > > >>> Can anyone help?
    > > >>> Thanks
    > > >>> Chris
    > > >

    > > What do you mean, 'does not work'? Are you getting compile errors, file
    > > not found errors or something else? What platform are you on?
    > >
    > > If you're running on Windows and are getting: 'javac' is not recognized
    > > as an internal or external command, operable program or batch file.'
    > > Then it's most likely a path issue.
    > >
    > > --
    > > TechBookReport Java http://www.techbookreport.com/JavaIndex.html
    chrisdude911, Sep 1, 2006
    #6
  7. chrisdude911 wrote:
    > i also tried C:\Program Files\Java\jdk1.5.0_08\bin\
    > and that didn't work
    > chrisdude911 wrote:
    >> C:\Java>javac HelloWorldApp.java
    >> 'javac' is not recognized as an internal or external command,
    >> operable program or batch file.
    >>
    >> that is the message, i have put C:\Program
    >> Files\JAVA\jdk1.5.0_08\bin\javac into the PATH but it is still not
    >> working
    >>
    >> TechBookReport wrote:
    >>> chrisdude911 wrote:
    >>>> That didn't work
    >>>> chrisdude911 wrote:
    >>>>> I will try JDK 5.0 Update 8 later when the site so busy that i cannot
    >>>>> download it
    >>>>> chrisdude911 wrote:
    >>>>>> Hi guys,
    >>>>>> I have just installed SDK 1.4.2 and i am following the
    >>>>>> http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    >>>>>> tourial.
    >>>>>> I tried installing version JDK 6 beta 2 but the javac command in
    >>>>>> command prompt did not work, i still have the same problem with SDK
    >>>>>> 1.4.2
    >>>>>> Can anyone help?
    >>>>>> Thanks
    >>>>>> Chris
    >>> What do you mean, 'does not work'? Are you getting compile errors, file
    >>> not found errors or something else? What platform are you on?
    >>>
    >>> If you're running on Windows and are getting: 'javac' is not recognized
    >>> as an internal or external command, operable program or batch file.'
    >>> Then it's most likely a path issue.
    >>>
    >>> --
    >>> TechBookReport Java http://www.techbookreport.com/JavaIndex.html

    >

    OK, open a command prompt, navigate to the bin directory and just type
    javac. If you get a screen full of options then there's nothing wrong
    with the install. Also, try using the full path to the javac.exe in your
    compile command.

    --
    TechBookReport Java http://www.techbookreport.com/JavaIndex.html
    TechBookReport, Sep 1, 2006
    #7
  8. chrisdude911

    chrisdude911 Guest

    Don't Worry now
    Simpe error i forgot to restart command prompt!
    we learn a new thing every day!
    Thanks
    Chris
    chrisdude911 wrote:
    > i also tried C:\Program Files\Java\jdk1.5.0_08\bin\
    > and that didn't work
    > chrisdude911 wrote:
    > > C:\Java>javac HelloWorldApp.java
    > > 'javac' is not recognized as an internal or external command,
    > > operable program or batch file.
    > >
    > > that is the message, i have put C:\Program
    > > Files\JAVA\jdk1.5.0_08\bin\javac into the PATH but it is still not
    > > working
    > >
    > > TechBookReport wrote:
    > > > chrisdude911 wrote:
    > > > > That didn't work
    > > > > chrisdude911 wrote:
    > > > >> I will try JDK 5.0 Update 8 later when the site so busy that i cannot
    > > > >> download it
    > > > >> chrisdude911 wrote:
    > > > >>> Hi guys,
    > > > >>> I have just installed SDK 1.4.2 and i am following the
    > > > >>> http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    > > > >>> tourial.
    > > > >>> I tried installing version JDK 6 beta 2 but the javac command in
    > > > >>> command prompt did not work, i still have the same problem with SDK
    > > > >>> 1.4.2
    > > > >>> Can anyone help?
    > > > >>> Thanks
    > > > >>> Chris
    > > > >
    > > > What do you mean, 'does not work'? Are you getting compile errors, file
    > > > not found errors or something else? What platform are you on?
    > > >
    > > > If you're running on Windows and are getting: 'javac' is not recognized
    > > > as an internal or external command, operable program or batch file.'
    > > > Then it's most likely a path issue.
    > > >
    > > > --
    > > > TechBookReport Java http://www.techbookreport.com/JavaIndex.html
    chrisdude911, Sep 1, 2006
    #8
  9. chrisdude911

    Guest

    to get windows/linux/etc etc to recognize a new command you have to
    tell the OS where the command .exe is present. To do this you have to
    change the environment variable. Search on google for: environment
    variables java classpath

    On windows --> control panel --> system --> advanced tab -->
    environment variables button --> then you have to change both the
    "path" and "classpath" environment variables

    make sure to NOT delete the path environment variable or you are kinda
    screwed.
    , Sep 1, 2006
    #9
  10. chrisdude911

    carnado2008

    Joined:
    Feb 4, 2009
    Messages:
    1
    Solving javac command not working in command prompt

    Step 1:Get into Environment Variables. I hope you know how to find it.

    Step 2:Find 4 variables below:-
    a) classpath
    b) include
    c) lib
    d) path

    If you can't find it...just create it...and for it's value...let it empty for a while...

    Step 3:Find location of your java.exe
    For example : C:\Program Files\Java\jdk1.6.0\bin\java.exe

    Step 4:Copy all word before java.exe
    So, what i must copy is : C:\Program Files\Java\jdk1.6.0\bin\

    Step 5:Get into Environment Variables again
    Now, for each variables that i have listed...add word in parentheses (.;) at the beginning of their Variable value.If it empty, just add .; into it...

    Step 6:For each Variable value in each 4 listed variables, add a semicolon(;) at the end and paste what you copy in Step 4.If ; exist, don't create it again...just paste what you copy in Step 4 after it...

    Step 7:Now restart your computer and check if you still get the error message.

    Step 8:If it still show the error message...get into Environment Variables again, go
    to each 4 variables that i have listed...and add double quotes (") between all word that you copy in Step 4.
    For example :
    "C:\Program Files\Java\jdk1.6.0\bin\"

    Step 9:Repeat Step 7
    carnado2008, Mar 5, 2009
    #10
  11. chrisdude911

    srk289

    Joined:
    Mar 10, 2009
    Messages:
    1
    @ Carnado2008

    Looks like the semicolon followed by the closing brace is converted into a smiley!!!
    Anywayz ppl who are following this must be facing some difficulty understanding wat our friend carnado is saying..
    The smiley's here are the SEMICOLON followed by CLOSING BRACE ..
    So replace this smiley [;)] with a semicolon ';' followed by a ')'
    And actualy even i had problem with JAVAC and the sol provided by carnado actually works!!
    so cheers
    srk289:)
    srk289, Mar 10, 2009
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,717
  2. gaurav kashyap
    Replies:
    2
    Views:
    613
    gaurav kashyap
    Oct 30, 2008
  3. gaurav kashyap
    Replies:
    3
    Views:
    683
    gaurav kashyap
    Oct 31, 2008
  4. Mel
    Replies:
    10
    Views:
    3,116
    Sailaja Appi
    Feb 13, 2009
  5. Y HA
    Replies:
    32
    Views:
    628
    John B. Matthews
    Dec 11, 2013
Loading...

Share This Page