Java 1.1 Physlets

Physlets are written using Java code that runs on Microsoft, Netscape, and Sun browsers.  Unfortunately, Physlets require not only a Java enabled browser, but also JavaScript to Java applet communication.  Current Macintosh browsers do not support both Java 1.1 and this communication.

Java has evolved rapidly since its introduction by Sun Microsystems in late 1995 and it has been difficult for software vendors to update their products to keep pace with new language features. Netscape, Microsoft and other vendors quickly adopted the first version of Java, version 1.0, and applets written for this version will almost certainly work with any application that supports Java. This includes Netscape Navigator, Internet Explorer, and authoring packages such as Front Page and Page Mill. Unfortunately, Java 1.0 had serious limitations as a programming language and needed fundamental changes and extensions in order for the language to reach its full potential. Although Java development environments from Borland, Symantec, Sun, and Microsoft quickly adopted the new specification, Internet browsers are only now beginning to support the new version. Running a Java 1.1 applet in a Java 1.0 aware application is likely to produce a gray box and a rather cryptic "Class not found" error message. Furthermore, Sun Microsystems and Microsoft have extended the language in different ways to provide access to native graphical user interface, GUI, components such as dialog boxes, toolbars, and menus. It is unlikely that the promise of platform independence is attainable in the foreseeable future if developers use some of the extensions available from competing vendors. However, the core language, including many version 1.1 features, is very stable and most educational software developers have chosen to stick with the original, albeit more limited, GUI components available since Java 1.0. This seems like a small price to pay and all Physlets have been written in Java 1.1 to provide maximum vendor and platform independence.

Although applets can be distributed as a collection of individual class files organized into subdirectories, there is a better way. Browsers are now capable of accessing and downloading a single "zip" file that contains everything necessary to run an applet. Java 1.1 takes this concept one step further and specifies a new file format called a Java Archive, jar, file. Jar files are zip files on steroids. In addition to an applet's class files, a Java archive contains a manifest listing the archive's contents and encrypted security information such as the applet vendor. In the event of a "Class not found" error message, it is useful to open a jar file with a standard file decompression utility, such as WinZip, and see if the requested file is actually available. Class files are, of course, also distributed by Netscape, Sun and Microsoft as part of a browser package and it is possible that a "Class not found" error is due to the fact that a browser vendor does not support the necessary functionality.