Java
Ron Graham
Java is a programming language, commonly used to create dynamic effects on Web pages (referred to as "applets" - "small applications"), though by no means limited to that use. Java is object-oriented, which means that the programmer can create "objects" (combinations of "methods," or programs, and the parameters on which those methods work). Java applets must be compiled, and executed at "run-time," or when the browser brings up on the screen the page containing the applets.

Java applets you write must be compiled, and you can do this with a development environment (e.g. Microsoft Visual J++, etc.) or by downloading the Java Development Kit (JDK) from java.sun.com.

Java is easier to learn for most programmers than C++, possibly accounting for its having established itself as a Web programming language. Java also has a wide range of predefined objects and methods, and a great deal of flexibility in error-handling.

On the other hand, even though it was created to be platform-independent, it isn't quite that way. Java, like JavaScript and HTML, must be examined on multiple browsers to ensure that your visitors will all experience the same effects. If you're willing to do this, and your goal is a page that "does cool things," then Java is something you want to use.

Java can be classified as a "development environment," which would include

  • the Java Development Kit (JDK)
  • a compiler
  • a debugger
  • utilities
  • a text editor (doesn't come with the JDK) for writing programs
Java can also be classified as a "runtime environment," based on
  • an interpreter, or Java Virtual Machine
  • libraries (the standard set of class libraries that come with the JDK)
  • an appletviewer or web browser (if you're writing applets)
And Java is a "programming language," which is
  • object-oriented
  • multithreaded (different parts of a program can run simultaneously)
  • interpreted (by a "virtual machine")

Some commonly-used applet effects include

  • Moving text, such as tickers and scrollers
  • Clocks
  • Moving images, such as rotating shapes or the <shudder!> Dreaded Lake Applet
  • Chat rooms
The following is an example of a scrolling text applet, created with CoffeeCup's Headline Factory:

NOTE: Your mileage will vary in terms of how much your site visitors will want these effects. Some find such effects as blinking images and scrolling text distracting.

References

Java Home Page - an excellent place to start learning, or to download the JDK
Kevin's Java Studio - Kevin offers a free and interesting TextScroll applet
Java's Open Studio - Sun offers a free clock and other applets
Ron's applet for shear load on a pattern of fasteners
Ron's applet for animation of a flexible manipulator
Ron's applet for dynamic response of a launch vehicle
Molly Hays teaches introductory Java for America Online


What You Can Do

  1. Don't do what everyone else does just because it's cool, or because everyone else does it. Let your Java add value as you would any other form of communication.
  2. Remember that Java acts as a plug-in on the Web. Some users will have it disabled. Those who don't will have to wait for Java to load and for your applets to start up. This wait can be longer than for graphics. Waiting annoys visitors! Use Java with caution!

[Table of Contents] [Previous] [Next]