PATH variable hooplah...

Discussion in 'Java' started by alex9009, Dec 26, 2006.

  1. alex9009

    alex9009 New Member

    Joined:
    Dec 26, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    ok... i am trying to follow the instructions on this site to install the java environment http://computer.howstuffworks.com/program2.htm

    I downloaded everything it told me to download, now i can't figure out the dang path variable thing! I have both files in the program files directory, and can't ever get the test to work. If you could, check out steps 6 & 7 on the link, and help me out :) Thanks in advance, this is really starting to annoy me.
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    You have add the Path of the Java bin directory to the Windows PATH environment variable so that JDK programs are accessible on the command line from any path.

    Right-click 'My Computer' and select Properties, goto Advanced tab and the click 'Environment Variables' button and the look for PATH in the System Variables section, click edit and append the path of Java bin directory to the existing entry.
     
  3. alex9009

    alex9009 New Member

    Joined:
    Dec 26, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    what do you mean by existing entry? Do I go and find the path of the entire folder? Is it a problem if the java environment folder is located on the C drive, not in any folders but right one the C drive? I don't really know why it was installed there... but it was. Also, was i supposed to extract the documentation into the folder, or just in the same place as the folder?
     
  4. alex9009

    alex9009 New Member

    Joined:
    Dec 26, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    ok... the path variable looks like this:

    C>: \J2sdk1.4.2_13\bin

    Does this seem right? should there be a space between the colon and the first slash? I just don't understand why its not working....
     
  5. alex9009

    alex9009 New Member

    Joined:
    Dec 26, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Hmmm... I wish could just edit my posts. Triple posting is bad...

    Ok, when i type in javac like it says to do in the tutorial, i get the message

    'JAVAC' is not recognized as an internal or external command,
    operable program or batch file.

    So... hope that helps. :)
     
  6. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    You have to add the path of the Java bin directory, so that when you type in command the shell would know where to look for.
    The PATH variable must be already containing other paths, which are separated by ; so all you have to do is add your path after the existing paths.
     
  7. alex9009

    alex9009 New Member

    Joined:
    Dec 26, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Well, i deleted to path that was already there and put in C>: \J2sdk1.4.2_13\bin I actually don't really understand you, i'm sorry i'm very new to this. So what exactly do i need to change the Path to? Also, maybe i'm changing the wrong thing... I go to environmental variables and change Path, is that right?
     
  8. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Well, the PATH variable usually contains the following by default
    Code:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
    And you just have to append the path to Java bin directory to the existing value present in the PATH variable, like this
    Code:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C>:\J2sdk1.4.2_13\
    I hope you got it this time.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice