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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    setting environment variables

    hii..
    i want to know how to set the environment variables for compiling and running java programs in command line in windows 7...i have tried a few ways as i found in net,..bt couldnt find the solution...plzz help me out...

  • #2
    New Coder
    Join Date
    May 2012
    Posts
    29
    Thanks
    2
    Thanked 0 Times in 0 Posts
    You should have these two environmental variables to allow Java to function correctly:

    JAVA_HOME: C:\ (YOUR_JDK_LOCATION) \bin

    Path: (The same as JAVA_HOME)

    For example, my environmental variables would appear like this:

    JAVA_HOME: C:\Program Files\Java\jdk1.7.0_05\bin

    Path: C:\Program Files\Java\jdk1.7.0_05\bin

    You do not need to set the EV named "Classpath"; Java will function fine without it. As a suggestion though, compiling through the command line is fairly old-hat and may cause you a lot of stress if you run in to a mistake with your code you have no idea how to fix. You really want to be trying out some Java IDEs (Integrated Development Environments), such as Netbeans (available from Oracle's website) or Eclipse.
    Last edited by Jemdt; 06-25-2012 at 07:07 PM.


  •  

    Posting Permissions

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