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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 14, 2005 2:44 PM
> To: [email protected]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to