Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Mar 2004 13:34:03 -0600
From:      Dennis Moore <archon@forbidden.dough.net>
To:        freebsd-java@freebsd.org
Subject:   How do I make appletviewer work?
Message-ID:  <20040304193403.GC69978@forbidden.dough.net>

next in thread | raw e-mail | index | archive | help
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@EFnet irc                                             mainly jesus
http://forbidden.dough.net/                                  and my pants



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040304193403.GC69978>