Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Oct 2010
    Location
    Florence, MS
    Posts
    486
    Thanks
    10
    Thanked 33 Times in 32 Posts

    Setting the path

    I am sure this has been asked before and I have tried following all of google results examples but it is still not working. I just downloaded the new JDK and trying to set it up. I believed I have my path set right and my class path set right.. but ugh its still not working when i type in javac in my command line. Please, help me. Its much appreciated.

    Path: C:\Program Files (x86)\Java\jre6\bin
    ClassPath: .
    ;C:\Program Files (x86)\Java\jre6\bin
    Last edited by Chris Hick; 01-13-2011 at 05:44 AM.
    Notice: If you post a problem and it gets fixed, please remember to go back and place it as solved. ;)
    I always recommend the HEAD First series of books for learning a new coding language. ^_^

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    If you open a cmd window and change your directory to C:\Program Files (x86)\Java\jre6\bin (you may have wanted the 64 bit build and not the 32 bit build) and execute javac or java, does that work?
    If so, it has nothing to do with Java its a problem with your OS path. Now that you mention it, I don't believe that mine added to the system path either when I installed java (Windows 7) which is unusual since it did in the past.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Regular Coder
    Join Date
    Oct 2010
    Location
    Florence, MS
    Posts
    486
    Thanks
    10
    Thanked 33 Times in 32 Posts
    Yeah, I have the 64 bit build. I tried to change the path. When I type in java it pulls up a bunch of information but when I type in javac it pulls up something about batch not found. It is weird because it worked on my windows vista a while back but not on my new windows 7... grrr.. any ideas?? I don't want to use an IDE right now.
    Notice: If you post a problem and it gets fixed, please remember to go back and place it as solved. ;)
    I always recommend the HEAD First series of books for learning a new coding language. ^_^

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    IDE still relies on javac.
    It sounds like JDK isn't installed; are you sure you got the JDK and not just the JRE? It will show up in your control panel programs with 'Development Kit' in it.

    Also sorry my bad. The JDK isn't installed under the JRE subdirectory. Mine for example is under C:\Program Files\Java\jdk1.6.0_22\bin. Can you try to switch your cmd to that directory (or list the directories under /java) and execute javac?
    And I can't be 100% certain since windows 7 is the first 64bit build I've had on a home pc, but I believe that jre and jdk can be built either as 64bit or 32bit and they won't interfere with each other, and on top of that I know(ish) you can have 32bit and 64bit at the same time (I broke my mirror with a 64bit jre install; couldn't uninstall or install over top of it, but I could install a 32bit jre). Potentially you might find that directory under the program files instead of the program files (x86).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #5
    Regular Coder
    Join Date
    Oct 2010
    Location
    Florence, MS
    Posts
    486
    Thanks
    10
    Thanked 33 Times in 32 Posts
    got it working buddy.. I had everything right except I was in my (x86) program files and not my program file lol
    Notice: If you post a problem and it gets fixed, please remember to go back and place it as solved. ;)
    I always recommend the HEAD First series of books for learning a new coding language. ^_^

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Ah gotcha, so it was a 64bit build. Glad to hear it wasn't a huge deal!
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •