Creating Help Topic Files

In JavaHelp, the contents of each help topic is defined by a file in HTML format. In this sense, JavaHelp’s HelpSet Viewer is very much like a web browser.

In this section, you’ll create the individual help topic files. As I mentioned before, if you want to save yourself the time and effort of typing a lot of HTML-format text, simply use the HTML topic files available at http://examples.oreilly.com/creatingjavahelp.

You’ve already declared, in the map file, both the names and the directory locations of the following MyJavaHelp topic files:

  • File Overview.htm in the Topics directory (see Example 2.1)

  • File Fitness.htm in the Interests subdirectory of the Topics directory (see Example 2.2)

  • File Computers.htm in the Interests subdirectory of the Topics directory (see Example 2.3)

  • File Movies.htm in the FavoriteMovies subdirectory of the Topics directory (see Example 2.4)

  • File Music.htm in the FavoriteMovies subdirectory of the Topics directory (see Example 2.5)

Example 2-1. Overview.htm

<html>
<head>
<title>Overview</title>
</head>
<body>
<h1>Overview</h1>
<p>Welcome to my JavaHelp system. In this help system I discuss
my interests in the following topics:
<ul>
  <li>Fitness</li>
  <li>Computers</li>
  <li>Movies</li>
  <li>Music</li>
</ul>
</body>
</html>

Example 2-2. Fitness.htm

<html> <head> <title>Fitness</title> </head> <body> <h1>Fitness</h1> <p>I enjoy the following fitness activities: <ul> <li>Running</li> <li>Biking</li> <li>Hiking</li> <li>Swimming</li> </ul> </body> ...

Get Creating Effective JavaHelp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.