You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@locus.apache.org on 2000/07/28 11:30:33 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Available.java
bodewig 00/07/28 02:30:31
Modified: docs index.html
src/main/org/apache/tools/ant/taskdefs Available.java
Log:
Available didn't resolve filenames correctly.
Reported by: Marc Gemis <ma...@belgium.agfa.com>
Revision Changes Path
1.59 +3 -0 jakarta-ant/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/index.html,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- index.html 2000/07/28 08:57:29 1.58
+++ index.html 2000/07/28 09:30:18 1.59
@@ -108,6 +108,9 @@
<h2><a name="buildingant">Building Ant</a></h2>
<p>Go to the directory <code>jakarta-ant</code>.</p>
<p>Make sure the JDK is in you path.</p>
+<p>Set the JAVA_HOME environment variable. This should be set to the
+directory where the JDK is installed. See <a href="#installing">Installing Ant</a>
+for examples on how to do this for your operating system.</p>
<p>Run <code>bootstrap.bat</code> (Windows) or <code>bootstrap.sh</code> (UNIX)
to build a bootstrap version of Ant.</p>
<p>When finished, use</p>
1.7 +5 -11 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java
Index: Available.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Available.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Available.java 2000/07/06 16:48:13 1.6
+++ Available.java 2000/07/28 09:30:31 1.7
@@ -68,7 +68,7 @@
private String property;
private String classname;
- private String file;
+ private File file;
private String resource;
public void setProperty(String property) {
@@ -86,8 +86,8 @@
this.classname = classname;
}
- public void setFile(String filename) {
- this.file = filename;
+ public void setFile(File file) {
+ this.file = file;
}
public void setResource(String resource) {
@@ -102,14 +102,8 @@
this.project.setProperty(property, "true");
}
- private boolean checkFile(String file) {
- try {
- File f = new File(file);
- return f.exists();
- } catch (Exception e) {
- log(e.toString(), Project.MSG_VERBOSE);
- return false;
- }
+ private boolean checkFile(File file) {
+ return file.exists();
}
private boolean checkResource(String resource) {