Author: jhm
Date: Wed Jul  5 23:36:44 2006
New Revision: 419463

URL: http://svn.apache.org/viewvc?rev=419463&view=rev
Log:
Examples for specifying a JDK in <java> and <javac>.

Modified:
    ant/core/trunk/docs/manual/CoreTasks/java.html
    ant/core/trunk/docs/manual/CoreTasks/javac.html

Modified: ant/core/trunk/docs/manual/CoreTasks/java.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/java.html?rev=419463&r1=419462&r2=419463&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/java.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/java.html Wed Jul  5 23:36:44 2006
@@ -241,9 +241,9 @@
 and treated like indicated in <i>failonerror</i>.</p>
 <p>Note:<br>
 If you do not specify permissions,
-a set of default permissions will be added to your Java invocation to make 
+a set of default permissions will be added to your Java invocation to make
 sure that the ant run will continue or terminated as indicated by
-<i>failonerror</i>. All permissions not granted per default will be 
+<i>failonerror</i>. All permissions not granted per default will be
 checked by whatever security manager was already in place. exitVM will be
 disallowed.
 </p>
@@ -256,7 +256,7 @@
 <p>You can control enablement of Java 1.4 assertions with an
 <a href="../CoreTypes/assertions.html"><tt>&lt;assertions&gt;</tt></a>
 subelement.</p>
- 
+
 <p>Assertion statements are currently ignored in non-forked mode.</p>
 
 <p><em>since Ant 1.6.</em></p>
@@ -340,13 +340,13 @@
          &lt;/classpath&gt;
        &lt;/java&gt;
 </pre>
-
 Run the JAR dist/test.jar relative to the directory
 <tt>${exec.dir}</tt>, this being the same directory into which the JVM
-is to start up. 
-
+is to start up.
 
 <pre>  &lt;java classname=&quot;test.Main&quot;/&gt;</pre>
+Runs a given class with the current classpath.
+
 <pre>
   &lt;java classname=&quot;test.Main&quot;
         fork=&quot;yes&quot; &gt;
@@ -355,12 +355,24 @@
     &lt;jvmarg 
value=&quot;-Xrunhprof:cpu=samples,file=log.txt,depth=3&quot;/&gt;
   &lt;/java&gt;
 </pre>
-<strong>Note</strong>: you can not specify the (highly deprecated) MSJVM, 
"jview.exe" as the
+Add system properties and JVM-properties to the JVM as in 
+<code>java ="-Xrunhprof:cpu=samples,file=log.txt,depth=3 -DDEBUG=true 
test.Main</code>
+
+<pre>  &lt;java classname=&quot;ShowJavaVersion&quot; classpath=&quot;.&quot;
+        jvm=&quot;path-to-java14-home/bin/java&quot; fork=&quot;true&quot;
+        taskname=&quot;java1.4&quot; &gt;
+</pre>
+Use a given Java implementation (another the one Ant is currently using) to 
run the class. 
+For documentation in the log <code>taskname</code> is used to change the 
<code>[java]</code>
+log-prefix to <code>[java1.4]</code>.
+
+
+<p><strong>Note</strong>: you can not specify the (highly deprecated) MSJVM, 
"jview.exe" as the
 JVM, as it takes different parameters for other JVMs,
-That JVM can be started from <code>&lt;exec&gt;</code> if required.
+That JVM can be started from <code>&lt;exec&gt;</code> if required.</p>
 <hr>
-<p align="center">Copyright &copy; 2000-2005 The Apache Software Foundation. 
All rights
+<p align="center">Copyright &copy; 2000-2006 The Apache Software Foundation. 
All rights
 Reserved.</p>
 
 </body>
-</html>
+</html>
\ No newline at end of file

Modified: ant/core/trunk/docs/manual/CoreTasks/javac.html
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/javac.html?rev=419463&r1=419462&r2=419463&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/javac.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/javac.html Wed Jul  5 23:36:44 2006
@@ -34,7 +34,7 @@
 have included.
 The <code>exclude</code> or <code>excludesfile</code> attribute is used
 to specify
-the files you want to have excluded. In both cases, the list of files 
+the files you want to have excluded. In both cases, the list of files
 can be specified by either the filename, relative to the directory(s) specified
 in the <code>srcdir</code> attribute or nested <code>&lt;src&gt;</code>
 element(s), or by using wildcard patterns. See the section on
@@ -369,7 +369,7 @@
 (<code>dir</code> becomes <code>srcdir</code>) as well as the nested
 <code>&lt;include&gt;</code>, <code>&lt;exclude&gt;</code> and
 <code>&lt;patternset&gt;</code> elements.</p>
-<h4><code>src</code>, <code>classpath</code>, <code>sourcepath</code>, 
+<h4><code>src</code>, <code>classpath</code>, <code>sourcepath</code>,
 <code>bootclasspath</code> and <code>extdirs</code></h4>
 <p><code>&lt;javac&gt;</code>'s <code>srcdir</code>, <code>classpath</code>,
 <code>sourcepath</code>, <code>bootclasspath</code>, and
@@ -540,6 +540,18 @@
 the non-example files refers to them.
 </p>
 
+<p>
+If you wish to compile with a special JDK (another than the one Ant is 
currently using),
+set the <code>executable</code> and <code>fork</code> attribute. Using 
<code>taskname</code>
+could show in the log, that these settings are fix.
+<pre>  &lt;javac srcdir=&quot.&quot 
+         destdir=&quot.&quot 
+         executable=&quotpath-to-java14-home/bin/javac&quot 
+         fork=&quottrue&quot
+         taskname=&quotjavac1.4&quot /&gt;</pre>
+</p>
+
+
 <p><b>Note:</b> If you are using Ant on Windows and a new DOS window pops up
 for every use of an external compiler, this may be a problem of the JDK you are
 using.  This problem may occur with all JDKs &lt; 1.2.</p>
@@ -628,4 +640,3 @@
 
 </body>
 </html>
-



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to