Applications and Applets:
Launcher

Launcher

Although it is possible to distribute single programs, this approach is not well suited for the distribution of curricular material. Few users want to deal with the complexities of command line syntax and resource management. Although jar files can contain resources such as html-based documentation, images, and sound, they are difficult to create and modify by casual users, particularly if the archive has been digitally signed. A large curriculum development project creates hundreds of programs and each program may be used in multiple contexts with different initial conditions. The Launcher and LaunchBuilder programs developed by Doug Brown at Cabrillo College solve many of these problems. Launcher is a Java application that can launch (execute) other Java programs. We use Launcher to organize and distribute collections of ready-to-use programs, documentation, and curricular material in a single easily modifiable package.

The Physics Demo Launcher package contains curricular units for classical mechanics (orbits), electromagnetism (radiation from point charges), and quantum mechanics (time evolution of superpositions of states).  The tabs at the bottom of the Launcher organize material for different audiences:

Resources

On startup Launcher searches for a file with an xset extension whose root-name matches the jar name (for example osp_demo.jar looks for osp_demo.xset), first as a file in the directory containing the jar and then within the jar itself. This search order allows teachers to adapt prepackaged content to their curricular needs by providing edited external files that override the internal ones. Thus, it is easy for end users to author and distribute their own Launcher-based curricular material without recompiling Java code or creating jar files. Moving, renaming or deleting these external files will cause Launcher to load the internal xml files again.

Launcher's search order for resources for applications, applets, and Java Web Start is:

  1. inside zip or jar (if explicitly specified in Launcher path)
  2. separate files on the local file system (if run as an application)
  3. separate files on the server Launcher (if run as an applet)
  4. inside zip file with name of xset
  5. inside zip or jar from which current xset has been opened
  6. inside launch jar
  7. in class path (Resource.class), but not in Sun jars.