Questions about Environment Variables

edited March 2014 in Android Mode
This discussion was created from comments split from: Android java issue.

Comments

  • I'm just returning to programming and have 2 questions regarding. I'm using Win 7 Pro 64. 1.Is it in Environment Variables? SIRUSCG stated Added C:\Program Files\java\jdk1.7_21\bin to my Path. Is it a new Path Statement or added to the existing Path. 2. If new can it be located at the of the Environment Variables? Thank you

  • edited March 2014

    I have split this comment into a separate question because it is unrelated to the previous post.

    If you create a separate variable, you must add a reference to it to the main PATH variable. This may be the preferred option because it makes the path variables easier to read. This is how it is done:

    JAVA_HOME = C:\Program Files\java\jdk1.7_21\bin
    PATH = C:\some\other\stuff\;%JAVA_HOME%
    

    A Variable can be unwrapped into another variable if its name is surrounded with percent signs. Separate entries must be separated by a semicolon.

    Based on what you have said, I believe that the path was appended to the end of PATH directly.

  • I have done nothing just wanted to make sure I understand it properly, so %JAVA_HOME% is added to the end of the existing Path? Java_Home is added separately, correct? Thanks

  • Yes, that is correct. Make sure your variable names are case sensitive - I don't think that you have a misconception here, but I think it is worth mentioning because your previous comment may be misleading.

  • Thanks uridang

Sign In or Register to comment.