Home > Articles

Vacationing in Java

  • Print
  • + Share This
This chapter is from the book

Going to School with Java

As a medium that offers a potential audience of millions, the World Wide Web includes numerous resources for educators and schoolchildren. Because Java programs can offer a more interactive experience than standard Web pages, some programmers have used the language to write learning programs for the Internet.

For one of the strongest examples of this use of Java, visit http://www.npac.syr.edu/projects/vishuman/VisibleHuman.html.

This Web site uses data from the National Library of Medicine's Visible Human Project. The project is a database of thousands of cross-sectional images of human anatomy. A Java program is being used to enable users to search the collection and view images. Instead of making requests by text commands, users make the requests to see different parts of the body by using the mouse, and the results are shown immediately in graphic detail. The Java program is shown in Figure 3.2.

Numerous educational programs are available for many different computer systems, but what makes this program remarkable is its versatility. The Visible Human Project tool is similar in function and performance to CD-ROM software that users might run on their computer systems. However, it is run directly from a Web page. No special installation is needed, and unlike most CD-ROM software, it isn't limited to PC-compatible and Macintosh systems. Just like Web pages, Java programs can be run on any computer system that can handle them.

To be able to handle Java programs, a Web browser must have a Java interpreter. The interpreter included with a browser serves a similar function as the interpreter you used to run the Saluton program during Hour 2, "Writing Your First Program." The difference is that a browser's interpreter can only run Java programs that are set up to run on Web pages and cannot handle programs set up to run from the command line. Currently, Java-enabled browsers are available for most systems, including PCs running a version of Microsoft Windows, Apple Macintosh systems, SPARC workstations, and computers running the Linux operating system.

Figure 3.2 Images from the National Library of Medicine's Visible Human Project can be viewed interactively on the Web using a Java program.

The primary Java-capable browsers in use today are Microsoft Internet Explorer, Netscape Navigator, Mozilla, and Opera. Although versions of these browsers support Java, none of them offer built-in support for Java 2. Browser developers have not been able to keep up with new versions of the language as quickly as Sun produces them, and at this time, it appears that all of the companies have given up trying to support anything beyond Java 1.1.

To make it possible for Java programmers to rely on Java 2 support in browsers, Sun has developed the Java Plug-in, a Java interpreter that works as a browser enhancement. By specifying in the coding of Web pages that this interpreter should be used instead of the one built into the browser, Java programmers can take advantage of all features of the language in their Web-based programs.


The Java Plug-in is more than 5 megabytes in size, so it would take more than 45 minutes for a user on a slow Internet connection to download and install the program. However, Sun includes it with the Software Development Kit and other products, so it may already be installed on your computer. If not, you can download and install it as part of the Java Runtime Environment: Visit the Web page http://java.sun.com/getjava/.

A Java program such as the Visible Human Project database does not have to be written for a specific computer system. This advantage is called platform independence. Java was created to work on multiple systems. Originally, Java's developers believed it needed to be multiplatform because it would be used on a variety of appliances and other electronic devices.

The programs you write with Java can be run on a variety of computer systems without requiring any extra work from you. This advantage is one of the primary reasons so many people are learning to write Java programs and are using them on software projects. Many professional software companies are using Java for the same reason. Under the right circumstances, Java can remove the need to create specific versions of a program for different computer systems. The potential audience for software grows with a multiplatform solution such as Java.

  • + Share This
  • 🔖 Save To Your Account