ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas Kramer <Douglas.Kra...@Sun.COM>
Subject Re: Ant Tutorial - Question
Date Mon, 14 Feb 2005 22:53:37 GMT
Venki,

Try this instead.  Yes, you need a method named "main" as follows:

public class HelloWorld {
     public static void main(String[] args) {
         System.out.println("Hello World");
     }
}

More details:
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html

-Doug

venkats@warpdriveonline.com wrote:
> 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