[4656] in java-interest

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

The Hello World Example

daemon@ATHENA.MIT.EDU (Fritz N. Francis)
Wed Jan 10 11:39:18 1996

To: java-interest@java.sun.com
From: fritz@environs.com (Fritz N. Francis)
Date: Wed, 10 Jan 1996 10:21:24 -0500

Hello,

I have been trying the Hello World example given at
http://java.sun.com/tutorial/getStarted/applet/index.html. and I am quite
confused why it does not work.

I typed the following in my MS-DOS edit:

import java.awt.Graphics;
               public class HelloWorld extends java.applet.Applet {
                   public void init() {
                       resize(150,25);
                   }
                   public void paint(Graphics g) {
                       g.drawString("Hello world!", 50, 25);
                   }
               }

as instructed from the web page.
I then compiled at my DOS prompt by typing:

javac HelloWorld.java

I received no compile errors. I then typed: " java HelloWorld"  and I
received the following error message:

In class HelloWorld: void main(String argv[]) is undefined.

I assumed that this source code is acceptable for Beta 1.0. Is this not
true? If so, what should the source code read?

Please help. Thanks.
-----------------
Fritz N. Francis
Vice-President of Operations
Online Environs, Inc.
38 Sidney Street Suite 350
Cambridge, MA 02139
Tel: (617) 225-0449
Fax: (617) 225-0677
E-mail: fritz@environs.com
URL: http://www.environs.com

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

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