| Oracle Help for Java Developer's Guide | Previous |
Once you have created the help for your product, you must deploy it with the product. The following sections describe how to deploy an Oracle Help for Java system.
Since Oracle Help for Java is a Java application (or applet), it must run in a Java Virtual Machine (VM). That means that you must ensure that your users will have an appropriate VM installed. If you are using OHJ as help for a Java application, that application must also run in a virtual machine, so it is likely that the VM is already being distributed with your application. Oracle Help for Java requires one of the following VMs:
The following JAR files must be redistributed as part of your product install. These files contain the OHJ engine implementation and its dependences. For more information about these files, see Contents of an OHJDK Release.
help-version_num.jarohj-jewt-version_num.jar or ohj-ewt-version_num.jar (depending on OHJ version)oracle_ice-version_num.jarIf you are using OHJ 4.1.x, your installed product must have access to the Java Foundation Classes (Swing). Swing 1.1.1 for JDK 1.1.8 is distributed with OHJ 4.1.x. JDK 1.2 and JDK 1.3 include the Swing classes already, so no extra library is needed if you are using those versions.
Java based applications are often distributed in JAR format. You may wish to include your Help content as a JAR file in your distribution, as HTML content files are significantly reduced in size by JAR compression.
To create JAR files, use the JAR tool that is distributed with your Java Development Kit. If you are using a third party Help Authoring System that supports OHJ, it may also be able to perform this task.
Special care should be given to the organization of files and their assigned paths within the JAR archives. The directory structure within your help JAR file must match the directory structure for your product implementation JAR files. Your help content should be "below" the location of the implementation class that you will use as a reference point.
For Example:
If your product implementation JAR includes classes with this directory structure...
/com/yourCompany/yourProduct/SomeProduct.class /com/yourCompany/yourProduct/SomeClass.class
...then your help JAR(s) should contain the matching paths so that the help content is below the product implementation classes in the shared directory structure:
/com/yourCompany/yourProduct/help/ProductHelp.hs /com/yourCompany/yourProduct/help/TableOfContents.xml /com/yourCompany/yourProduct/help/SomeHelpTopic.html
To create a Book object with help content loaded from a JAR file, the help JAR file and implementation JAR file(s) must be on the system CLASSPATH. If you have organized the JAR files as described above, then you know the location of the help content relative to the location of your implementation classes on the CLASSPATH.
Thus, you will use the versions of the HelpBook/helpset constructors that accept a Java class and a relative path from that class (see Constructing HelpBooks/helpsets).
For Example:
If we had the two JAR files described in the example above, you would construct the helpset object using the following:
import com.yourCompany.yourProduct.SomeProduct; helpset myhelpset = new helpset(SomeProduct.class, "help/ProductHelp.hs");
Previous |