Set Environment Variables
Perform the following steps after installing the JDK:
- Set the JAVA_HOME Windows Environment Variable location to JDK installation path. (Example JAVA_HOME=C:\Program Files\Java\jdk1.6.x).
- Set the Path to the bin directory of Java installation. (Example Path=C:\Program Files\Java\jdk1.6.x\bin).
To set the Environment Variable and Path in Windows XP:
- Right click on My Computer and select Properties.
- In the System Properties window, go to Advanced tab and select Environment Variables.
- In the Environment Variables window, go to User Variables and select New.
- Enter JAVA_HOME in the Variable Name field.
- Enter C:\Program Files\Java\jdk1.6.x (as per the example) in the Variable Value field.
- Click OK.
- Select Path from User Variables and click Edit.
- Add C:\Program Files\Java\jdk1.6.x\bin (as per the example) in the Variable Value field.
- Click OK.
To set the Environment Variable and Path in Windows Vista/7:
- Right click on Computer and select Properties. System window appears.
- Select Advanced System Settings link from the Control Panel Home pane. System Properties window appears.
- Select Environment Variables.
- In the Environment Variables window, go to User Variables pane and select New.
- Enter JAVA_HOME in the Variable Name field.
- Enter C:\Program Files\Java\jdk1.6.x (as per the example) in the Variable Value field.
- Click OK.
- Select Path from User Variables and click Edit.
- Add C:\Program Files\Java\jdk1.6.x\bin(as per the example) in the Variable Value field.
- Click OK.