Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Thursday, December 6, 2007

Setting the path environmental variable in XP and Vista

Setting the path environmental variable in XP and Vista.

It is often convenient to set the path environmental variable to call commands. For example, the "javac MyClass.java" command would use the javac command located in the path to compile the MyClass.java file to an executable. Here is how to set it up:


For Windows XP:
Start-> Control Panel -> System -> Advance Tab -> Environmental Variables.
Select Path -> Edit.
Append ";myPath" to environment variable, where myPath is the directory that contains your resources..
OK

For Windows Vista:
Start -> Control Panel -> System and Maintenance -> System -> Advanced system settings
click Continue
Select Environmental Variables
Select Path -> Edit.
Append ";myPath" to environment variable, where myPath is the directory that contains your resources..
OK

1 comments:

Anonymous said...

When I click on "Environment Variables" in Vista, it is different... I see 2 lists: User Variables and System Variables. I click on "New" under System Variables and get 2 fields: Variable Name and Variable Value. So... I guess I put the full path of jdk1.6.0\bin as the Variable Value... but what about Variable Name? I tried to guess what to do, but I couldn't get javac to work without the full path...

Thanks :)

Blog Archive

About Me