Results 1 to 10 of 10
  1. #1
    spudllew is offline Member
    Join Date
    Jun 2011
    Location
    North Wales
    Posts
    6
    Rep Power
    0

    Default Setting java up on my pc

    Have just downloaded jdk1.6.0_26

    I remeber in uni having to change some system variables on my laptop before i could complie any code, however this information doesn't seem to come with the download.

    When i try to compile in cmd typing 'javac' it returns the classic
    'javac' is not recognised as an internal or external command...

    which i know means i'm still not fully set up to begin coding :)

    Any help/links to help get me going would very much be apprieciated!

    Info:
    java -version yields:
    java version "1.6.0_23"
    Java(TM) SE Runtime Environment (build 1.6.0_23-b05
    Java Hotspot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)

  2. #2
    Shoss's Avatar
    Shoss is offline Member
    Join Date
    Feb 2011
    Posts
    94
    Rep Power
    0

    Default

    Assuming you're using windows, you have to set the PATH environment variable to point to the jdk's bin directory.

    How do I set or change the PATH system variable?

  3. #3
    spudllew is offline Member
    Join Date
    Jun 2011
    Location
    North Wales
    Posts
    6
    Rep Power
    0

    Default

    Thank you.
    But still can't compile :(

    added it's location ';C:\Program Files (x86)\Java\jdk1.6.0_26\bin' to the end of the path file in environmental variables

    But i'm still getting the same compile error
    Anything i've missed ?

    Thank you

  4. #4
    ron2794 is offline Member
    Join Date
    Dec 2010
    Posts
    38
    Rep Power
    0

    Default

    i think you have to put one more "\" after the bin.

  5. #5
    spudllew is offline Member
    Join Date
    Jun 2011
    Location
    North Wales
    Posts
    6
    Rep Power
    0

    Default

    Sorry that didn't work either :(

    found another post/thread on here saying i need to do the same for the jre
    so added
    ';C:\Program Files (x86)\Java\jre6\bin\'
    to the path too.

    really stumped as there doesn't seem to be any instructions for the whole set up process. :(

  6. #6
    Shoss's Avatar
    Shoss is offline Member
    Join Date
    Feb 2011
    Posts
    94
    Rep Power
    0

    Default

    That really should be all you need to do, try double checking that javac.exe actually exists in that directory. Just a long shot but i saw you said you were using "cmd", every time you make a change to the path variable you'll have to close and open a new instance of cmd. If you're using the same window it won't have the updated path.

  7. #7
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default

    Show us what your path variable is set to by opening a command prompt window and entering: Path
    Then copy the full output here.
    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.

    here's what mine looks like:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    D:\Norms\Norms Tools>path
    PATH=C:\Program Files\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO WS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_04\bin;C:\BatchFiles;C:\Progra m Files\Support Tools\;C:\WINDOWS\system32\WindowsPowerShell\v1.0; C:\Program Files\QuickTime\QTS
    ystem\

    D:\Norms\Norms Tools>

  8. #8
    ron2794 is offline Member
    Join Date
    Dec 2010
    Posts
    38
    Rep Power
    0

    Default

    YA everything is fine and it should work for sure. Make sure about the javac.exe and java.exe exist there in bin directory or not...................as said above SLOSS

  9. #9
    spudllew is offline Member
    Join Date
    Jun 2011
    Location
    North Wales
    Posts
    6
    Rep Power
    0

    Default

    Forgot about that property of cmd (should have known :))

    Yes compiling like there's no tomorrow thank you all :)

  10. #10
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,197
    Rep Power
    19

    Default

    You can always refer the following link :
    That's a crappy site. Why go there when Oracle has their own tutorial?
    Trail: Getting Started (The Java™ Tutorials)

    db

    edit @shwetasabane: Stop posting your pet link to old dead threads or you'll be banned as a spammer. The two posts you made to old threads have been deleted.
    Last edited by DarrylBurke; 06-10-2011 at 09:42 PM. Reason: Found two zombie resurrections duplicating the previous post.

Similar Threads

  1. Need help setting up my environment in Java
    By coding in forum New To Java
    Replies: 5
    Last Post: 01-31-2011, 08:52 AM
  2. setting classpath for java in ubuntu
    By kulangotski in forum Java Servlet
    Replies: 0
    Last Post: 01-03-2011, 02:18 AM
  3. setting memory limit for java?
    By MuslimCoder in forum New To Java
    Replies: 1
    Last Post: 08-26-2010, 06:09 PM
  4. Help with setting up Java
    By itmasterw in forum New To Java
    Replies: 6
    Last Post: 01-18-2008, 11:04 PM
  5. Setting Java Path
    By bugger in forum New To Java
    Replies: 2
    Last Post: 11-22-2007, 09:48 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
  •