- right click My Computer
- click Properties
- go to Advanced system settings
- click on Advanced tab
- click on Environment Variables
- click on New...
Now you can define an environment variable, type JAVA_HOME in Variable name and in Variable value the path to you JAVA_HOME, the same thing goes for ANT_HOME.