<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Capabilities of Ant opts Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/capabilities-of-ant-opts/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/capabilities-of-ant-opts/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:53:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Usage of ANT_OPTS in Ant Script &#124; ANT_OPTS capabilities</title>
		<link>https://www.scmgalaxy.com/tutorials/usage-of-ant_opts-in-ant-script-ant_opts-capabilities/</link>
					<comments>https://www.scmgalaxy.com/tutorials/usage-of-ant_opts-in-ant-script-ant_opts-capabilities/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 14 Apr 2010 07:00:20 +0000</pubDate>
				<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[ANT]]></category>
		<category><![CDATA[ANT OPTS]]></category>
		<category><![CDATA[ANT OPTS capabilities]]></category>
		<category><![CDATA[Ant Opts in Ant Script]]></category>
		<category><![CDATA[ANT OPTS Usage]]></category>
		<category><![CDATA[ANT OPTS Usage in Ant Script]]></category>
		<category><![CDATA[Ant Script]]></category>
		<category><![CDATA[Capabilities]]></category>
		<category><![CDATA[Capabilities of Ant opts]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[How to use Ant opts in Ant Script]]></category>
		<category><![CDATA[Instruction]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Usage]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2010/04/14/usage-of-ant_opts-in-ant-script-ant_opts-capabilities/</guid>

					<description><![CDATA[<p>Usage of ANT_OPTS in Ant Script &#124; ANT_OPTS capabilities Ant has three environment variables that you can use to set [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/usage-of-ant_opts-in-ant-script-ant_opts-capabilities/">Usage of ANT_OPTS in Ant Script | ANT_OPTS capabilities</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4239" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/04/ant_opts-in-ant-script.png" alt="ant_opts-in-ant-script" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/04/ant_opts-in-ant-script.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/04/ant_opts-in-ant-script-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><b>Usage of ANT_OPTS in Ant Script | ANT_OPTS capabilities</b></p>
<p>Ant has three environment variables that you can use to set its default behavior.<br />
• ANT_ARGS Set this variable to include those options you use frequently.<br />
• ANT_OPTS is a list of arguments that you want to pass to the JVM that will run Ant.<br />
• JAVACMD is the absolute path to the Java executable you want Ant to use. you may specify a value for the JAVACMD environment variable. This defaults to %JAVA_HOME%\bin\java, typically invoking the JVM provided in Sun&#8217;s Java Development Kit. Ant provides JAVACMD for those who wish to specify an alternate JVM. full path of the Java executable. Use this to invoke a different JVM than JAVA_HOME/bin/java(.exe).</p>
<p>These are useful environment variables that the Ant wrapper scripts use when<br />
invoking Ant: ANT_OPTS and ANT_ARGS. Neither of these is typically set by users,<br />
but each can provide value for certain situations.</p>
<p>The ANT_OPTS environment variable provides options to the JVM executing Ant,<br />
such as system properties and memory configuration. ANT_OPTS &#8211; command-line arguments that should be passed to the JVM. For example, you can define system properties or set the maximum Java heap size here.</p>
<p><b>For authenticated proxy: </b><br />
Set your ANT_OPTS environment variable to configure your proxy if you have one. For instance:<br />
set ANT_OPTS=-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=3128</p>
<p>You can set these properties by either modifying Ant&#8217;s startup script, or by<br />
using the ANT_OPTS environment variable. The following example shows the Windows commands to specify these properties using ANT_OPTS, and then to invoke Ant:<br />
set ANT_OPTS=-DproxySet=true -DproxyHost=localhost -DproxyPort=80<br />
ant mytarget<br />
The same trick works on Unix, although the syntax is slightly different depending on which<br />
shell you use:<br />
$ export ANT_OPTS=&#8221;-DproxySet=true -DproxyHost=localhost -DproxyPort=80&#8243;<br />
$ ant mytarget</p>
<p>set ANT_OPTS=-Dhttp.proxyHost=myproxyhost -Dhttp.proxyPort=8080 -Dhttp.proxyUserName=myproxyusername -Dhttp.proxyPassword=myproxypassword -Dhttps.proxyHost=myproxyhost -Dhttps.proxyPort=8080</p>
<p>&nbsp;</p>
<p><b>Use </b><b>ANT_OPTS </b><b>to control Ant’s virtual machine settings.</b><br />
Some tasks may require more memory, which you can set in the ANT_OPTS environment variable, using the appropriate mechanism for your platform:<br />
set ANT_OPTS=-Xmx500M<br />
export ANT_OPTS=-Xmx500M</p>
<p>Setting the maximum heap size is another common use of ANT_OPTS. Here is how we set the maximum size to 128 MB when using Sun&#8217;s JDK:<br />
set ANT_OPTS=-Xmx128m</p>
<p>One environment variable you may wish to set is ANT_OPTS. The value of this variable is passed as a JVM argument. Specifying system properties is a common use. In this simple<br />
<b>example, we pass the </b><b>log.dir </b><b>system property to the JVM running Ant:</b><br />
$ set ANT_OPTS=-Dlog.dir=C:\logs<br />
$ ant run<br />
Now this property is available within the buildfile, for instance:<br />
&lt;echo&gt;Log directory is set to: ${log.dir}&lt;/echo&gt;<br />
If the buildfile runs a Java application, the property may be retrieved from within it as<br />
follows:<br />
String logDir = System.getProperty(&#8220;log.dir&#8221;);</p>
<p>&nbsp;</p>
<p><b>Troubleshoot: Illegal Java options in the ANT_OPTS variable</b><br />
The environment variable ANT_OPTS provides a means to pass options into Ant,<br />
such as a permanent definition of some properties, or the memory parameters for<br />
Java. The variable must contain only options the local JVM recognizes. Any invalid<br />
parameter will generate an error message such as the following (where ANT_OPTS was<br />
set to –3):<br />
Unrecognized option: -3<br />
Could not create the Java virtual machine.</p>
<p>If the variable contains a string that is mistaken for the name of the Java class to run<br />
as the main class, then a different error appears:</p>
<p>Exception in thread &#8220;main&#8221; java.lang.NoClassDefFoundError: error-string<br />
Test: Examine ANT_OPTS and verify that the variable is unset or contains valid<br />
JVM options.<br />
Fix: Correct or clear the variable.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/usage-of-ant_opts-in-ant-script-ant_opts-capabilities/">Usage of ANT_OPTS in Ant Script | ANT_OPTS capabilities</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/usage-of-ant_opts-in-ant-script-ant_opts-capabilities/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
