How do I make appletviewer work?

Dennis Moore archon at forbidden.dough.net
Thu Mar 4 11:34:04 PST 2004


Hello,

I'm just starting to learn java and going through the Sun tutorial.  I
created a basic Hello world program and that worked, but when I tried to
make an applet I ran into trouble.  I can run the applet fine in a browser,
but when I run it in appletviewer, nothing happens.

Here is my program:

import java.applet.*;
import java.awt.*;

public class HelloWorld extends Applet {
	public void paint(Graphics g) {
		g.drawString("Hello world!", 50, 25);
	}
}

Here is my HTML:
<html>
	<head>
		<title>Hello World Applet</title>
	</head>
	<body>
		<applet code="HelloWorld.class" width="150" height="25">
	</body>
</html>

The class compiles fine.  Here are java ports:

j2sdkee-1.3.1_4     Java 2 SDK Enterprise Edition
javavmwrapper-1.4   Wrapper script for various Java Virtual Machines
jdk-1.4.1p4         Java Development Kit 1.4.1
jsdk-2.0            Sun's Java Servlet Developers Kit
linux-sun-jdk-1.3.1.08 Sun Java Development Kit 1.3 for Linux
linux-sun-jdk-1.4.2.01_3 Sun Java Development Kit 1.4 for Linux

Is there something I'm missing?  Do I have a wrong version?

Thanks

-- 
Dennis Moore                                         jesus sewed my pants
Pro Bono Devil's Advocate                              it's a love affair
archon at EFnet irc                                             mainly jesus
http://forbidden.dough.net/                                  and my pants


More information about the freebsd-java mailing list