Publishing a Hyperwire Title
Hyperwire ensures that all associated files reside in the project directory.
The runtime class subtree is found in the directory \Hyperwire\Classes\.
Java class names must begin with an uppercase letter, can contain letters and numbers but no spaces or special characters. If you enter a label that begins with a lowercase letter or a number, when you run or publish the title Hyperwire creates a class whose name begins with Hyperwire_, followed by the label. To avoid this prefix, make sure the label is a valid Java class name.
If you want to publish more than one title in a single directory, the class name must also be unique to that directory.
Hyperwire generates the .java and .class files and writes them to the project directory. Depending on the publishing options, it can write additional files used by some browsers.
Note: Publishing a title as stand-alone Java application is similar to publishing an applet. For more information, see exercise 17.
When you use the Title/Title Run command, or click the Run button on the toolbar, Hyperwire generates a Java file and then compiles it into a class file that can run as an applet in a browser that supports Java. As long as you are testing your own code or sharing it with close colleagues, using Title/Run Title is an adequate way to generate a Hyperwire applet or application. But if you plan to distribute your work to a wide audience, and especially if you want to publish it on the Web, then you should use the more robust Title/Publish Title command.
Title/Publish Title generates additional files that can enhance applet performance when the applet is displayed by certain kinds of browsers. Hyperwire publishing accommodates three options for delivering Java applet code:
This option is recognized by all browsers that support Java, but it takes the most disk space and the longest time to load.
This option is the most efficient in disk space and loads the most quickly, but at present is supported by only the Microsoft Internet Explorer browser (version 3 or later).
This option is less efficient than the cabinet option, but more efficient than the first option. At present it is supported by only the Netscape Navigator browser (version 3).
In addition to generating the appropriate CAB and ZIP files, Publish Title adds their associated tags to the HTML file it generates for the applet. You can copy the HTML code generated by Hyperwire to the HTML file that publishes your applet on the Web. (Browsers that don't support the additional options ignore these additional tags.)
The browser-specific tags are as follows:
In addition to the OBJECT tag, the cabinet option adds a parameter to the usual APPLET tag. The name of this parameter is "cabbase" and its value is a string with the name of the CAB file containing the Hyperwire title code.
See the Microsoft documentation of the CAB format for more information.
See Netscape documentation for more information.
By default, Title/Publish Title publishes all three options at once. You can change the options by using the Title Publishing panel of the title's Properties dialog. See the online Help for detailed information about publishing options.
Exercise 3 demonstrates how to publish a Hyperwire title.
The basic Hyperwire runtime does not include support for 3D World or Whip modules. If your applet uses either of these features, your end-users also have to install the appropriate runtime classes and DLLs.
To install Hyperwire 3D, the end-user must run the install program Hw3D.exe. To install Hyperwire Whip, the end-user must run the install program HwWhip.exe.
The runtime install programs are in the \Client directory on your Hyperwire CD. These programs are freely distributable. You can provide them on your own Web site, or you can direct end-users to the Hyperwire page on the Kinetix Web site, www.ktx.com/hyperwire. Your site should tell end-users that they need to run the appropriate install programs before they can use your applet.
The \Client directory also has a program to install the Hyperwire runtime classes. It is called HwRt.exe. Installing the runtime classes locally is not necessary for running Hyperwire applets, but it can improve performance, especially when the end-user has an older browser. The program HwRt.exe is also freely distributable.
A couple of cautions relate to publishing the media for your title:
When you deploy your application on a Web server that is a UNIX system, be careful to check the media files and make sure their names have the same capitalization they had when you created the title.
The publishing almanac created by the Title Publish command contains a list of all media—actually, all URLs including those that identify media—that the title references. This file is an HTML file whose name begins with the name of the title and ends with _Summary.html. You can use the URL list to check the capitalization of the media files as they are recognized by the title.