LIS 523/5 - Java

Java is an object-oriented programming language with a family resemblance to to C++, but somewhat simplified. It was originally developed for handheld devices (under the name OAK) by Sun Microsystems and received its present name in 1995 when it was extended for use on the Web.

Java source code (*.java) files are semi-compiled into a (*.class) "bytecode" format which can then be executed by a Java interpreter or compiled for a particular machine by a just-in-time (JIT) compiler. Java interpreters or JIT compilers and runtime environments (Java Virtual Machines) exist for most operating systems, including UNIX, Macintosh OS, and Windows.

Small Java applications are called Java applets and can be downloaded from a Web server and run by a Java-compatible Web browser, such as Netscape Navigator or appropriate installations of Microsoft Internet Explorer. Unlike full applications, applets are not designed to be executed directly from the operating system. Java applet usage is small (about 1¼% of Web sites in April, 2007, according to Security Space). In an agreement with Sun, Microsoft is phasing out the Microsoft Java Virtual Machine (MSJVM), which is not included in more recent versions of Windows and support for which is to end at the end of 2007. Those wishing to run Java applets can still download a free plug-in from Sun.

What Are Java Applets Used For?

Here are some of the more common applications for which Java applets have been employed:

There are many ready-made Java applets available on the Web.

How to Incorporate a Java Applet in a Web Page

If you change the HTML code for the applet at all (usually to modify one of the applet's parameters), refreshing or reloading the page in the browser is not sufficient to reset the applet; instead, you will need to request the page again explicitly by URL or as a local file.

As an example, if you have Java enabled and it is working correctly with your browser, you should see below a message that fades in and out again a black background.

Some Restrictions on Applets

For client security reasons, there are a number of things that applets are not allowed to do:

Java applets tend to create problems for visitors: they tend to be slow, as well as inconsistent in speed; they may not work in some browsers or when delivered by some servers, or will suddenly cease working for no apparent reason; and they can cause the browser to crash. Some applets work only with more recent versions of the Java Virtual Machine. Installing or updating the Java Virtual Machine requires administrator privileges, which users may not have (for example, users of the FIMS labs).

Server-Side Java

Sun also offers servlet technology. A servlet is almost like an applet, except that it runs on the server. Unlike proprietary server extension mechanisms (such as Microsoft FrontPage extensions), servlets are designed to be independent of the server platform.

JavaServer Pages (JSP) technology is an extension of the servlet technology along the same lines as Microsoft's Active Server Pages (ASP).

For More Information

For more links, see Yahoo!'s Java page (

Last updated April 20, 2007.
This page maintained by Prof. Tim Craven
E-mail (text/plain only):
Faculty of Information and Media Studies
University of Western Ontario,
London, Ontario
Canada, N6A 5B7