Applications and Applets

So far we have been dealing with standard Java applications. One of Java's strengths is that it can be run over the Internet within a web browser, used to add life to static web pages for example. But allowing arbitrary programs to run on your computer is hardly a good idea, as all sorts of damage can be done. Java offers a solution to this in the form of Applets.

Applets are Java programs that require a browser (or similar) to run. They run inside the browser, or pop up a window saying'Applet' and run inside that. They are subject to restrictions in what they can do - basically, no accessing the local machine's resources (no writing or reading from hard drive, no local network access, etc.).

Most of the Java stuff you will have seen before today is likely to be applets - some people think Java only has applets and so has all sorts of restrictions on its power. This is not true.

The next exercise will introduce you to Applets.