I am an Eclipse newbie who are trying to learn how to write tasks from
the following tutorial:
http://ant.apache.org/manual/index.html
example code from the tutorial:
import org.apache.tools.ant.Project;
public class HelloWorld {
private Project project;
public void setProject(Project proj) {
project = proj;
}
public void execute() {
String message = project.getProperty("ant.project.name");
project.log("Here is project '" + message + "'.",
Project.MSG_INFO);
}
}
I could not find the org.apache.tools.ant.jar package from the
http://ant.apache.org/ homepage.
How do I get around this "The import org.apache.tools cannot be
resolved" error?
Oliver Wong - 31 May 2006 16:45 GMT
>I am an Eclipse newbie who are trying to learn how to write tasks from
> the following tutorial:
> http://ant.apache.org/manual/index.html
[...]
> I could not find the org.apache.tools.ant.jar package from the
> http://ant.apache.org/ homepage.
>
> How do I get around this "The import org.apache.tools cannot be
> resolved" error?
http://ant.apache.org/manual/install.html#installing
<quote>
ant
+--- bin // contains launcher scripts
|
+--- lib // contains Ant jars plus necessary dependencies
</quote>
Did you check the ant/lib directory?
- Oliver