Page 1 of 2 12 LastLast
Results 1 to 20 of 29
  1. #1
    kotoko is offline Member
    Join Date
    Nov 2007
    Posts
    4
    Rep Power
    0

    Thumbs down javac not recognized as an internal or external command

    I am unable to runthe javac command
    I get a "javac not recognized as an internal or external command"
    I searched and tried everything I found but nothing works.
    What I have so far:
    :confused: eclipse runs perfectly (but I really need to run javac for school purposes)

    :confused: my system variables:
    JAVA_HOME -> C:\Programas\Java\jdk1.6.0
    CLASSPATH -> .;%JAVA_HOME%
    Path -------> %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Programas\ATI Technologies\ATI Control Panel;C:\Programas\MATLAB7\bin\win32; %PATH%; %JAVA_HOME%\\bin

    :confused: if I hava the file.java inside the directory where javac is it works perfectly

    Pleeease help!


    :confused: I'm trying to compile at D:\dei\workspace\HelloWorld\src

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    It looks like you have one extra \ in "%JAVA_HOME%\\bin"

  3. #3
    kotoko is offline Member
    Join Date
    Nov 2007
    Posts
    4
    Rep Power
    0

    Default not working

    tried and still not working. :(

    btw - it was like that in the tutorial I followed (it was like that twice)

  4. #4
    hiranya is offline Member
    Join Date
    Jun 2007
    Location
    Colombo, Sri Lanka
    Posts
    32
    Rep Power
    0

    Default

    type the following in the terminal (or command prompt) and see whether you get any output. If you get an error message then your environment variables haven't being setup properly.

    Java Code:
    java -version
    Regards,
    Hiranya

  5. #5
    kotoko is offline Member
    Join Date
    Nov 2007
    Posts
    4
    Rep Power
    0

    Default finally a command that works! :)

    Java Code:
    java -version
    returns the version of java properly.

    Does this mean anything about my system variables and\or what is my problem?

  6. #6
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    Hmm. Check if you have javac in the JDK's bin directory. It looks like you have a java.exe there but no javac.exe.

  7. #7
    kotoko is offline Member
    Join Date
    Nov 2007
    Posts
    4
    Rep Power
    0

    Default

    I found the problem I had a space between ; and the start of the path in the system variable . . .

    I now newbie error but thanks a lot for your help! :)

  8. #8
    jona is offline Member
    Join Date
    Jan 2010
    Posts
    1
    Rep Power
    0

    Question javac is not recognized as an internal or external commad

    hello sir...
    i've recently downloaded java programming software....when i tried to execute my frist program demo.java(my class name is demo)..its displaying a msg 'javac is not recognized as an internal or external commad'...i tried in many ways to set the path but i couldn't...
    i've tried java -version in command prompt,it displayed "1.6.0_18" but
    after installation it got placed n C:\program files\java\jre6.....,and 1.6.0_18 is no where shown,n even javac.exe is also not existing in bin...i tried many suggestions to set the path,class path,java_home bt they were of no use...plz plz plz help me...:confused:

  9. #9
    DivyaG is offline Member
    Join Date
    Jul 2010
    Posts
    2
    Rep Power
    0

    Unhappy problem with javac

    hi all,

    I installed jdk1.6.0_21 version and if I try to compile a simple Hello.java file, it throws an error saying "javac is not recognised as internal or external command". I have set my path as E:\Program files\java\jdk1.6.0_21\bin; Should it be set as both user & system variables??

    Whats the mistake here?? plzzz help.

  10. #10
    Join Date
    Mar 2009
    Posts
    51
    Rep Power
    0

    Wink

    you set the path that's a good job.now u need to set the class path by giving in the console like set classpath=./

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

    Default

    Is the javac.exe file at the location in your PATH variable?
    Open a command prompt window and enter: PATH to display the variables contents.
    Does it show the path to the javac.exe file?

  12. #12
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,728
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by a poster
    plz plz plz
    Quote Originally Posted by another poster
    plzzz
    What are you? Bees or something? Please type proper English words here, we are not all insects.

    kind regards,

    Jos

  13. #13
    DivyaG is offline Member
    Join Date
    Jul 2010
    Posts
    2
    Rep Power
    0

    Default

    Hi Norm,

    When I give PATH in the cmd prompt, it does not show the location of javac.exe.......

  14. #14
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,786
    Rep Power
    25

    Default

    You need to change the PATH environment variable so it includes the path.
    The PATH environment variable is set from the Settings | Control Panel | System panel.
    Select the Advanced tab and
    Click on the Environment variable's button.
    At the bottom in System Variables, find the PATH entry and click the Edit button
    Add the new path using ; to separate it
    Its a stupid small text field so be careful.

  15. #15
    slawtah is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

    Default

    This has been happening to me for the last 2months and its really pissing me off, on my old PC profile it never happened and now its happening on almost every RSPS client i download including deathzscape and i really want to get rid of it. So when i extract the file off winrar onto the desktop and click run.bat this happens



    apparently its do do with CLASSPATH and PATH on your environment variable and these are mine.

    my CLASSPATH: * * * * *.;c:\Program Files\Java\jdk1.6.0_06\bin;

    my PATH: * * * * * * * * * * C:\foo\bar\> set PATH=%PATH%;C:\j2sdk1.4.2_01\bin

    These are ones i recently got off java forums and other places where people needed help and it still doesent work.

    And these is how many servers do and don't work for me and there is alot more but have deleted most of them.




    CAN SOMEONE PLEASE HELP ME CAUSE IM DESPERATE :'(

  16. #16
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,786
    Rep Power
    25

    Default

    The OS can't find the java command on your computer.
    There might be something wrong with your java installation. When the jre or jdk are installed the java.exe file is copied to a folder that is on the PATH. You do not need to set the path to the java.exe file yourself.

    Do a system search for java.exe. On my system(WinXP), I find it in the following folders:
    C:\WINDOWS\system32\
    C:\Program Files\Java\jdk1.5.0_04\bin\

  17. #17
    slawtah is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

    Default

    im on vista

  18. #18
    slawtah is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

    Default

    can't find it anywhere, i'll try downloading it again and setting it to a file that i can find.

  19. #19
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,786
    Rep Power
    25

    Default

    How are you able to compile a java program and create class files without having the java.exe file available as part of the JDK you installed to get the javac.exe file?

  20. #20
    slawtah is offline Member
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    0

Page 1 of 2 12 LastLast

Similar Threads

  1. Eclipse's internal Tomcat
    By vadimf in forum Eclipse
    Replies: 0
    Last Post: 02-14-2008, 10:37 AM
  2. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 01:23 AM
  3. an internal error occurred during refresh
    By christina in forum Eclipse
    Replies: 1
    Last Post: 08-06-2007, 10:37 PM
  4. Replies: 4
    Last Post: 07-20-2007, 05:18 AM
  5. Description the server encountered an internal error
    By Jack in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-02-2007, 03:24 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
  •