From a41723ab30aa5c6a234b0480b5613eec9f7f94b0 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Go to the directory jakarta-ant.
Make sure the JDK is in you path.
+Set the JAVA_HOME environment variable. This should be set to the +directory where the JDK is installed. See Installing Ant +for examples on how to do this for your operating system.
Run bootstrap.bat (Windows) or bootstrap.sh (UNIX)
to build a bootstrap version of Ant.
When finished, use
diff --git a/src/main/org/apache/tools/ant/taskdefs/Available.java b/src/main/org/apache/tools/ant/taskdefs/Available.java index 5bd0ac778..d2646245d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Available.java +++ b/src/main/org/apache/tools/ant/taskdefs/Available.java @@ -68,7 +68,7 @@ public class Available extends Task { private String property; private String classname; - private String file; + private File file; private String resource; public void setProperty(String property) { @@ -86,8 +86,8 @@ public class Available extends Task { 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 @@ public class Available extends Task { 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) {