Putting an Applet on the Web
This explains how to put your applet on the web.
It assumes that your applet already runs correctly under eclipse
and that you are working in one of the CS labs.
For this example, we assume that the applet is contained in the project
pr1, uses the package pack1, and the name of the applet
- Open an explorer window and migrate to your workspace directory.
- Go to the pr1 directory.
- Go to the bin directory of pt1.
- You should see a directory called pack1.
- Open another explorer window and migrate to the public_html directory
of you Z: drive.
- Create a directory called pr1 under public_html
and go into that directory.
- Copy (do not drag) the pack1 directory from
your-workspace\pr1\bin\ into public_html\pr1.
- Run the applet from eclipse.
You should have a file whose name starts with
pack1.MyApplet in your
Copy (do not drag) this to public_html\pr1 also.
Note: this file may go away if you kill the applet, so you must do this
while the applet is running.
- Start up the SSH Shell client
- Log into your account.
- If you have not already done so, get a copy of the allowall
program by typing:
- In a browser, go to:
- You should see the file that starts with
pack1.MyApplet file there.
- Click on it and this should start your applet in the browser.
- When run from a browser, the size of the applet is determined by
the parameters in the pack1.MyApplet file.
The default values are probably 200 by 200.
You can edit these to make the applet larger.