You are here: Help Authoring Basics > Help Targets in Doc-To-Help > JavaHelp Target

JavaHelp Target

JavaHelp software was developed to provide a standard Help solution for pure Java applications. JavaHelp software was released in April 1999, by Sun MicroSystems, and is currently in release 2.0. While there is no “standard” viewer, JavaHelp uses components from the HotJava browser for its display. To view a JavaHelp HelpSet, the Java Run time Environment (JRE) or the Java Development Kit (JDK) must reside on the computer in addition to JavaHelp.

Doc-To-Help 2007 has improved support for the JavaHelp target. JavaHelp versions starting from 1.1.3 are supported, including JavaHelp 2.0.

•      JavaHelp secondary and pop-up windows are now supported. Topics designated for display in a secondary or pop-up window are now shown in a JavaHelp secondary or pop-up window. Previously, all topics were shown in the main window.

•      This version fully supports fonts in JavaHelp. JavaHelp has known problems with font support. Therefore, help authors who used other tools or authored JavaHelp manually were usually limited to using just one default font for the entire text. Now Doc-To-Help authors can make JavaHelp display fonts properly.

Font support is controlled by three new properties in Help Target (JavaHelp): IgnoreFontNames, IgnoreFontSizes and ScaleFontSizes. By default, IgnoreFontNames = True and IgnoreFontSizes = True. It means that fonts specified in the source document are ignored, default JavaHelp fonts are used instead (default font for text, special default fonts for headings). This is the same behavior as in previous versions. If both IgnoreFontNames and IgnoreFontSizes properties are set to False, JavaHelp will use fonts exactly as they are defined in the source document. This is normally what authors want, but the matter is slightly complicated because of a known JavaHelp bug that makes all fonts appear smaller (approximately 1.3 times smaller) than they should be. Doc-To-Help provides two alternative ways of rectifying this. Setting IgnoreFontSizes to True will allow you to have consistent default JavaHelp font sizes while retaining proper font families (font names). Alternatively, you can set the ScaleFontSizes property to a real number other than the default 1.0 that will scale all their fonts to adjust their sizes. For example, if you see that JavaHelp displays fonts 1.3 times smaller that they should be, you can set ScaleFontSizes to 1.3 to fix that.

•      All colors are now supported in JavaHelp themes. Previously, only basic colors were supported.

•      Help window caption can now be specified using the new Caption property in Help Target (JavaHelp).

•      Default topic, the topic that is shown when opening help, is now properly supported.

•      The size of the main and secondary windows can now be specified in the Windows node of the Project tab using the Left, Top, Width, Height properties or the Size Tool invoked from the context menu.

•      In JavaHelp themes in Theme Designer, it is now possible to hide the navigation bar (Next and Previous commands) by selecting Position = None in Navigation Bar\Layout.

•      JavaHelp tabs Contents, Index, Search, Favorites can be shown/hidden by setting new properties in the Help Target (JavaHelp): ContentsTab, IndexTab, SearchTab and FavoritesTab. Tooltip strings for these tabs can be customized\localized using the properties StringContents, StringIndex, StringSearch and StringFavorites. Please note that Favorites tab is available only in JavaHelp 2.0; it is not supported in JavaHelp 1.1.3.

To build and view JavaHelp, you must first install the necessary files from Sun. The JavaHelp folder on the Doc-To-Help CD contains the JRE (Java Runtime Environment) and the JavaHelp 1.1.3 distribution. To install JavaHelp, do the following:

1.   Run j2re-1_4_1_02-windows-i586.exe to install the JRE.

2.   Unzip javahelp-1_1_3.zip into any directory. Root folders such as C:\ are acceptable.

3.   Set the environment variable JAVAHELP_HOME based on the folder used in the previous step. For example, if you unzipped into the root folder on the C: drive, then the variable value should be:

C:\jh1.1.3

Note: Do not include a trailing backslash.

4.   Make sure to include java.exe in your path. If you are unable to launch the JavaHelp viewer from Doc-To-Help, this is most likely the reason.

For more information, see Sun's JavaHelp Web site at: http://java.sun.com/products/javahelp/

JavaHelp uses the three-pane viewer model, combining navigational components, viewer pane, and buttons in the viewer. Navigational components include contents, index, and search. Unlike the HTML Help standard viewer, the HelpSet viewer is a demo viewer, not a standard viewer. JavaHelp is fully extensible and customizable, should a programmer wish to take advantage of this flexibility. In practice, however, the HelpSet viewer has become the de facto standard viewer.