Monday, July 18, 2011

How to Set Path Variable in Windows 7

a. Checking  if java is set as path environment variables:

1. Go to Start-> Run-> cmd

2. write: java -version and hit Return/Enter. If the path variable set properly it will show your java version.


b. Setting path variable in windows 7:

1. Go to start menu -> control panel -> system and security -> System.
or simply paste this in your windows explorer address bar-->
Control Panel\System and Security\System

2. Now select "Advanced system settings" from the left panel.

3. A new window appears. Click on "Environment variables..."
4. under System Variables, find PATH, and click on it.
 
5. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value. 

6. the location looks like: "C:\Program Files (x86)\Java\jdk1.6.0_23\bin;" end it with a semicolon.

7. Click ok. 

8. Close all these windows.

C. Check if path variable is set properly:

1. Go to command prompt/cmd.

2. write: "java -version" end hit Return/Enter. if the path variable set properly it will show your java version.

3. If it still not working reboot your computer and try step c1 & c2.

Hope, now your path variable for java is set. Else read steps of "b" carefully.

1 comment:

  1. [...] the M2_HOME environment variable. [almost similiar as this]: adding the M2_HOME variable in the user variables with the value C:Program FilesApache [...]

    ReplyDelete