Running an Applet

I'm trying to make an Applet run on a Solaris box.
I can't get it to run.

These files are on the server and they are all in the same


The source code for my HelloWorld.class file before compilation is:
import java.applet.Applet;
import java.awt.Graphics;

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

This program does run locally on the JVM and in the IE
browser. So it's something on the server or not on the

Also, does anyone know the minimum classes that need tob
be imported for an applet to run in IE and Netscape ?

Does anyone have any ideas ?




  • Hi.

    You're saying that you're trying ro run this applet in a Solaris box? What do you mean - a text console (something like a telnet session)? Then it's no wonder that your applet doesn't work since those console windows are text-only and an applet is graphical.

    Other possibility is that you've put your applet with all corresponding classes on the server and try to access it from outside (the internet) with a browser. Then you'll have to check whether the directory you're using is public or if you've got some home-directory where you can put websites (e.g. /home/username/public_html on many systems).
    Ask your admin about this.
    In case of the latter one you'll have to set the rights for all the files properly in order to be able to access them from outside. Something like chmod 701 for the directory containing the files and 604 for the files themselves should do.

    -- planning is the substitution of hazard by error --

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion