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.dhpc.adelaide.edu.au/projects/vishuman2.
This website uses data from the National Library of Medicine’s Visible Human Project, 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.
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.
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.
The primary Java-capable browsers in use today are Microsoft Internet Explorer, Mozilla Firefox, Netscape Navigator, and Opera. Although versions of these browsers support Java, none of them offer built-in support for Java 2 version 5. Browser developers have not kept up with new versions of the language as quickly as Sun produces them.
To make it possible for Java programmers to rely on current Java support in browsers, Sun developed the Java plug-in, a Java interpreter that works as a browser enhancement. When the plug-in is present, Java programmers can take advantage of all features of the language in their web-based programs.
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.