This article describes how to set an environment variable, specifically ANT_OPTS.
If you are getting this error:
The environment variable ANT_OPTS is not set. Please set it to the recommended value of "-Xms256M -Xmx512M".
It means that your environment variable is not set and that you need to set it.
Set ANT_OPTS #
- Go into your System Properties from the Control Panel
- Click "New" in your User Variables
- Variable name: "ANT_OPTS"
- Variable value: "-Xms256M -Xmx512M"
Setting ANT_OPTS in ant.bat #
- Edit the ant.bat file in your ant home folder.
- Add the following line at the top of the file:
set ANT_OPTS=-Xms256M -Xmx512M
Edit ~/.bashrc or ~/.bash_profile to include:
ANT_OPTS="-Xms256M -Xmx512M" export ANT_OPTS
Make sure to exit the command prompt to realize the changes.