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

[EMAIL PROTECTED] 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: [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