Setting System Variables on a Windows Machine
The following steps will walk you through adding System Environment Variables to a machine running Windows.
1. Click on Start button located on your windows taskbar. The start menu will open.
2. Right click on My Computer to display a popup menu.
3. Select Properties. The Systems window will open displaying basic information about your computer.
4. Click on the Advanced System Settings link located on the left hand side of the window.
5. The Systems Properties window will open to the Advanced tab
6. Click on the Environment Variables button to open the Environment Variables window.
7. Click on the New button to open the New System Variable window.
8. Enter the following for your JAVA_HOME variable
Variable Name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.7.0_40
Warning
- The variable value shown above is an example. When adding the JAVA_HOME variable in your environment you need to enter the path for your Java JDK directory.
- It is extremely important the path is to the JDK location and not to the Java root directory.
- The same holds true when you add the JBOSS_HOME and ANT_HOME variables in the next steps. The JBOSS_HOME variable needs to have the path for your JBoss directory and the ANT_HOME variable should have the path for your Ant directory.
9. Click on the OK button to save the new entry and return to the Environment Variables window.
10. Click on the New button to add your JBOSS_HOME variable.
Variable Name: JBOSS_HOME
Variable value: C:\opt\jboss-as-7.1.1.Final
11. Click on the OK button to save the new entry and return to the Environment Variables window.
12. Click on the New button to add your ANT_HOME variable.
Variable Name: ANT_HOME
Variable value: C:\opt\apache-ant-1.8.2
13. Click on the OK button to save the new entry and return to the Environment Variables window.
14. All of the variables you just entered should appear in the list of System Variables.
15. Close the Environment Variables window, the System Properties window, and the Systems window.