Browse Source

a note on using 3344{toString:} for path references

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@491723 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
ecd195e73e
2 changed files with 46 additions and 1 deletions
  1. +28
    -1
      docs/manual/CoreTasks/javac.html
  2. +18
    -0
      docs/manual/using.html

+ 28
- 1
docs/manual/CoreTasks/javac.html View File

@@ -173,7 +173,11 @@ invoking the compiler.</p>
</tr> </tr>
<tr> <tr>
<td valign="top">bootclasspath</td> <td valign="top">bootclasspath</td>
<td valign="top">Location of bootstrap class files.</td>
<td valign="top">
Location of bootstrap class files. (See <a href="#bootstrap">below</a>
for using the -X and -J-X parameters for specifing
the bootstrap classpath).
</td>
<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>
<tr> <tr>
@@ -684,6 +688,29 @@ while all others are <code>false</code>.</p>
<code>build.compiler.jvc.extensions</code> to false before invoking <code>build.compiler.jvc.extensions</code> to false before invoking
<code>&lt;javac&gt;</code>.</p> <code>&lt;javac&gt;</code>.</p>


<h3><a name="bootstrap">Bootstrap Options</h3>
<p>
The Sun javac compiler has a <em>bootclasspath</em> command
line option - this corresponds to the "bootclasspath" attribute/element
of the &lt;javac&gt; task. The Sun compiler also allows more
control over the boot classpath using the -X and -J-X attributes.
One can set these by using the &lt;compilerarg&gt;. Since Ant 1.6.0,
there is a shortcut to convert path references to strings that
can by used in an OS independent fashion (see
<a href="../using.html#pathshortcut">pathshortcut</a>). For example:
</p>
<pre>
&lt;path id="lib.path.ref"&gt;
&lt;fileset dir="lib" includes="*.jar"/&gt;
&lt;/path&gt;
&lt;javac srcdir="src" destdir="classes"&gt;
&lt;compilerarg arg="-Xbootstrap/p:${toString:lib.path.ref}"/&gt;
&lt;/javac&gt;
</pre>

</p>

<h3>OpenJDK Notes</h3> <h3>OpenJDK Notes</h3>
<p> <p>
The <a href="https://openjdk.dev.java.net/">openjdk</a> The <a href="https://openjdk.dev.java.net/">openjdk</a>


+ 18
- 0
docs/manual/using.html View File

@@ -494,6 +494,24 @@ can be written as:
&lt;path id=&quot;base.path&quot; path=&quot;${classpath}&quot;/&gt; &lt;path id=&quot;base.path&quot; path=&quot;${classpath}&quot;/&gt;
</pre> </pre>


<h4><a name="pathshortcut">Path Shortcut</a></h4>
<p>
In Ant 1.6 a shortcut for converting paths to OS specific strings
in properties has been added. One can use the expression
${toString:<em>pathreference</em>} to convert a path element
reference to a string that can be used for a path argument.
For example:
</p>
<pre>
&lt;path id="lib.path.ref"&gt;
&lt;fileset dir="lib" includes="*.jar"/&gt;
&lt;/path&gt;
&lt;javac srcdir="src" destdir="classes"&gt;
&lt;compilerarg arg="-Xbootstrap/p:${toString:lib.path.ref}"/&gt;
&lt;/javac&gt;
</pre>


<h3><a name="arg">Command-line Arguments</a></h3> <h3><a name="arg">Command-line Arguments</a></h3>
<p>Several tasks take arguments that will be passed to another <p>Several tasks take arguments that will be passed to another
process on the command line. To make it easier to specify arguments process on the command line. To make it easier to specify arguments


Loading…
Cancel
Save