Results 1 to 10 of 10
  1. #1
    trucutru is offline Member
    Join Date
    Jan 2009
    Posts
    2
    Rep Power
    0

    Default HELP installing JDK please!

    so I installed the java 6 JDK update 11 and eveyrthing seems fine I think...I did my hello world code which I copied from a website as a test and then when I try to compile my code it gives me the error "javac is not recognized as an internal or external command, operable program or batch file. I am doing this in the command prompt window. I did set the CLASS AND CLASSPATH, is there anything else I need to setup before start writting code?
    Attached Thumbnails Attached Thumbnails HELP installing JDK please!-javaimage.jpg  

  2. #2
    ashton is offline Member
    Join Date
    Jan 2009
    Posts
    31
    Rep Power
    0

    Default my suggestion..

    why don't you try downloading and installing Netbeans IDE 6.5, or other IDE's??

    They have automatic compilation properties so you don't have to re-type
    your *.java file for it to compile.. I'm using one too... IDE's saves time atleast, instead of going through the Command Prompt over and over again...

    But hey, 'tis jst my suggestion, you may disagree if you want...

  3. #3
    ashton is offline Member
    Join Date
    Jan 2009
    Posts
    31
    Rep Power
    0

    Default my suggestion..

    Oh yeah... I forgot, just try this site "sun.com"

    just click on netbeans (on the top left corner), and you'll find alot of stuff there...

    IDEs can support different languages, there's one that can support C#, C++, PHP, RUBY, and others, so just take your pick...

  4. #4
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    The way you're doing it, you need to cd into the bin directory, but that's not the proper way to do things. You need to set your environment variables for PATH and JAVA_HOME. JAVA_HOME should be the directory for the JDK, and PATH should be the bin directory in the JDK. Actually, I might have it switched around, but I'm pretty sure that this is correct. Anyways, after setting this up, you don't need to bother going into the actual java directory to try to compile.

  5. #5
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    use this in cmd. its only a temp fix, for you to try it out.

    Java Code:
    set PATH=C:\Program Files\Java\jdk1.6.0_11\bin
    echo %path%
    
    javac....
    for permanent fix, right click on my computer, choose properties. advanced tab. enviroment variable.
    find path. then add that to it using semicolon (;). like this

    c:\windows;C:\Program Files\Java\jdk1.6.0_11\bin;

    its ez to do, difficult to describe. or maybe i'm lazy.

  6. #6
    trucutru is offline Member
    Join Date
    Jan 2009
    Posts
    2
    Rep Power
    0

    Default

    ill try out all suggestions and ill get back tomorrow at night thank you all

    -tru

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by angryboy View Post
    use this in cmd. its only a temp fix, for you to try it out.

    Java Code:
    set PATH=C:\Program Files\Java\jdk1.6.0_11\bin
    echo %path%
    
    javac....
    for permanent fix, right click on my computer, choose properties. advanced tab. enviroment variable.
    find path. then add that to it using semicolon (;). like this

    c:\windows;C:\Program Files\Java\jdk1.6.0_11\bin;

    its ez to do, difficult to describe. or maybe i'm lazy.
    Actually that set command is not necessary to set the path to the Java bin. You can do it in this way as well.

    Java Code:
    PATH=C:\Program Files\Java\jdk1.6.0_11\bin
    Yes, this is not permanent. If you close the command prompt and open it again to use, must do the same thing again.

    If you are clever on AUTOEXEC.Bat editing, through that able to set the path permanently.

  8. #8
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    oops, forgot to mention what it means to set environmental variables. d'oh!

  9. #9
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    wait winxp still uses autoexec.bat??
    If you do put it in autoexec.bat, then its prob better like this:
    PATH=%path%;C:\Program Files\Java\jdk1.6.0_11\bin
    USE CODE TAGS--> [CODE]...[/CODE]
    Get NotePad++ (free)

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Need Help installing java - can you help me?
    By Menre in forum New To Java
    Replies: 4
    Last Post: 02-22-2010, 01:33 PM
  2. Installing j2s in eclipse3.4
    By ravjot28 in forum Eclipse
    Replies: 0
    Last Post: 07-07-2008, 07:51 PM
  3. installing j2s
    By ravjot28 in forum Eclipse
    Replies: 9
    Last Post: 06-27-2008, 12:10 PM
  4. Installing JMF
    By vinnieza in forum Eclipse
    Replies: 0
    Last Post: 05-04-2008, 08:11 PM
  5. Installing Java
    By Adv3nt in forum New To Java
    Replies: 3
    Last Post: 12-13-2007, 12:29 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
  •