Browse Source

Fix typos.

Submitted by: Larry Shatzer


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277763 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
d2be6574a7
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      docs/manual/OptionalTasks/script.html

+ 4
- 4
docs/manual/OptionalTasks/script.html View File

@@ -237,13 +237,13 @@ filesizes of all files a <code>&lt;fileset/&gt;</code> caught.</p>
&lt;/target&gt;
&lt;/project&gt;
</pre></blockquote>
<p>We want to use the Java API. Because we don´t want always typing the package signature
<p>We want to use the Java API. Because we don't want always typing the package signature
we do an import. Rhino knows two different methods for import statements: one for packages
and one for a single class. By default only the <i>java</i> packages are available, so
<i>java.lang.System</i> can be directly imported with <code>importClass/importPackage</code>.
For other packages you have to prefix the full classified name with <i>Package</i>.
For example ant´s <i>FileUtil</i> class can be imported with
<code>importClass(<b>Package</b>.org.apache.tools.ant.util.FileUtils)</code>
For other packages you have to prefix the full classified name with <i>Packages</i>.
For example Ant's <i>FileUtils</i> class can be imported with
<code>importClass(<b>Packages</b>.org.apache.tools.ant.util.FileUtils)</code>
<br>
The <code>&lt;script&gt;</code> task populates the Project instance under
the name <i>project</i>, so we can use that reference. Another way is to use its given name


Loading…
Cancel
Save