CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2017
    Posts
    3

    Angry Setting Environment Variables for the JDK location

    I am a novice to Java (and pretty much programming languages in general).
    After i downloaded Java I created the JAVA-HOME variable (under environment variables) and the I tested the JRE (using the command prompt) and everything came out fine. But I am do not know what to do to the environment variables in order for my JDK to be set up. I tried editing the path variable but it did not work for me. Please help!!

  2. #2
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,877

    Re: Setting Environment Variables for the JDK location

    Look at the tutorial about how to set the PATH variable:
    http://docs.oracle.com/javase/tutori...ems/index.html

    it did not work
    Please explain. What OS are you using?

    The OS needs to be able to find commands that are entered. It uses the paths in the PATH variable to find them.
    Norm

  3. #3
    Join Date
    Sep 2017
    Posts
    3

    Exclamation Re: Setting Environment Variables for the JDK location

    Quote Originally Posted by Norm View Post
    Look at the tutorial about how to set the PATH variable:
    http://docs.oracle.com/javase/tutori...ems/index.html


    Please explain. What OS are you using?

    The OS needs to be able to find commands that are entered. It uses the paths in the PATH variable to find them.
    I am using Windows. I have tried editing the "Path" system variable to no avail. When I access the Path variable I am show a number of different lines (unlike the tutorials I find which show that the Path variable only has one line of data), therefore I am not sure where to append the JDK location. Name:  ev.jpg
Views: 261
Size:  34.3 KB

    If someone could let me know exactly which line of data I need to add it to and if I need to add anything to the end.
    Attached Images Attached Images  

  4. #4
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,877

    Re: Setting Environment Variables for the JDK location

    where to append the JDK location
    As a new line at the end of the list.
    Norm

  5. #5
    Join Date
    Sep 2017
    Posts
    3

    Re: Setting Environment Variables for the JDK location

    Quote Originally Posted by Norm View Post
    As a new line at the end of the list.
    I added this as a new line at the end of the list: C:\Program Files (x86)\Java\jdk1.8.0_144\bin\

    Thank you so much!!

  6. #6
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,877

    Re: Setting Environment Variables for the JDK location

    Glad you got it working.

    Now for some programming fun.
    Norm

  7. #7
    Join Date
    Sep 2017
    Posts
    1

    Re: Setting Environment Variables for the JDK location

    Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts

  8. #8
    Join Date
    Aug 2017
    Posts
    36

    Re: Setting Environment Variables for the JDK location

    Set the following user environment variables (== environment variables of type user variables)

    JAVA_HOME : C:\Program Files\Java\jdk1.8.0_112
    JDK_HOME : %JAVA_HOME%
    JRE_HOME : %JAVA_HOME%\jre
    CLASSPATH : .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
    PATH : your-unique-entries;%JAVA_HOME%\bin (make sure that the longish your-unique-entries does not contain any other references to another Java installation folder.
    Notice that these environment variables are derived from the "root" environment variable JAVA_HOME. This makes it easy to update your environment variables when updating the JDK. Just point JAVA_HOME to the fresh installation.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured