ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: Ant Tutorial - Question
Date Mon, 14 Feb 2005 22:56:10 GMT
I think this should say...

public class HelloWorld extends org.apache.tools.ant.Task {
...

This is an Ant task, not a stantalone java program. Ant contains the main method somewhere.
It's not necessary to know for writing tasks. If you really want to find out though, look
at the script ant or ant.bat in the $ANT_HOME/bin directory. This wrapper script sets up the
classpath and calls java with the class containing the main method as an arg.

Hope this helps,

-Rob Anderson

> -----Original Message-----
> From: venkats@warpdriveonline.com [mailto:venkats@warpdriveonline.com]
> Sent: Monday, February 14, 2005 2:44 PM
> To: user@ant.apache.org
> Subject: Ant Tutorial - Question
> 
> 
> Hello:
> 
> I am trying to do the Ant tutorial to understand how it works.
> 
> According to the tutorial, I have to create a HelloWorld.java with the
> following code:
> 
> public class HelloWorld {
>     public void execute() {
>         System.out.println("Hello World");
>     }
> }
> 
> I am also new to java. My understanding is that all Java 
> applications have
> to have an entry point of main method.
> 
> Though the above program compiles, I cannot run the .class.
> 
> Your help is solicited.
> 
> Venki
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message