Article View: comp.lang.java.help
Article #22Help: This simple applet won't run.
From: Peter
Date: Sat, 07 Aug 1999 00:00
Date: Sat, 07 Aug 1999 00:00
39 lines
1702 bytes
1702 bytes
Hi, i have installed jdk1.2 that comes with the
book " Just Java 2" on WIN95. I run java
from MS-Dos prompt.
I can run the demo code myframe.java but when i
try to execute the simple code graf.java from p.561
of " Just Java 2", i got the following error message
( compilation is OK):
c:\jdk1.2\bin\java graf
Exception in thread " main " java.lang.NosuchMethod Error: main
#####
Anyone has a clue of what's wrong or is there something
wrong with my Window system ?
The following is the code of graf.java
import java.awt.*;
import java.applet.*;
public class graf extends Applet {
public void paint(Graphics g) {
g.drawRect(25,30,60,40);
g.drawRect(125,30,100,100);
g.setColor(Color.cyan);
g.drawOval(25,30,60,40);
g.drawOval(125,30,100,100);
}
}
Thanks for any help
Sam
Technical Details
Message-ID:
<37AB9ED7.B0213FC6@tnetnz.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113ae9,7cafe47c609da7a7 X-Google-Attributes: gid113ae9,public X-Google-Thread: 10d6db,7cafe47c609da7a7 X-Google-Attributes: gid10d6db,public X-Google-Thread: f5d71,7cafe47c609da7a7 X-Google-Attributes: gidf5d71,public From: Peter <peter52@tnetnz.com> Subject: Help: This simple applet won't run. Date: 1999/08/07 Message-ID: <37AB9ED7.B0213FC6@tnetnz.com> X-Deja-AN: 509814396 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@xtra.co.nz X-Trace: titan.xtra.co.nz 933994184 6369226 210.55.199.153 (7 Aug 1999 02:49:44 GMT) Organization: Customer of Telecom Internet Services Mime-Version: 1.0 NNTP-Posting-Date: 7 Aug 1999 02:49:44 GMT Newsgroups: comp.lang.java.help,comp.lang.java,aus.computers.java