[1765] in java-interest

home help back first fref pref prev next nref lref last post

Re: main() in beta

daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Sat Sep 16 11:45:56 1995

Date: Fri, 15 Sep 1995 10:47:59 -0800 (PDT)
From: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
Reply-To: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
To: Jonathan Fine <jfine@umich.edu>
Cc: java-interest@java.Eng.Sun.COM



Hi Jonathan,

> I've been looking at the new JDK applets which embed buttons, such as
> CardTest.java and ArcTest.java, and I was wondering what is calling
> main() in these applets.  I looked at java.applet.Applet and all its
> superclasses, but I couldn't find any reference to main().
> 
> In a similar applet that I wrote, I tried a System.out.println()
> within main(), and although main() is mysteriously executed, the
> System.out.println() inside was never executed.
> 
> Could someone help clear this up for me?  Thanks.

I'm not sure what you mean. Applets generally don't have a main method.
A main method is needed only if you want to run the applet both as a main
program and as an applet (see demo/CardTest/CardTest.java).

Have fun,

	Arthur van Hoff

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post