Errata

Creating Effective JavaHelp

Errata for Creating Effective JavaHelp

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 17

The URL for the Java Developer Connection should be http://developer.java.sun.com, not http://developer.javasoft.com.

Anonymous   
Printed Page 97
next to last sentence

More a suggestion than an error, although I agree with the comment that is already
here. The Map.jhp file needs to have "topic" and "howto" changed to "Topic" and
"HowTo".

My suggestion involves sample code to replace the "Try" section of the code when
running the HelpSet out of a jar file. It took me a while to "find/figure out" the
correct syntax.
***************
// try code for executing the help from a JAR file.

// NOTE: you must edit the Map.jhm file and change "topic" to
// "Topic" and "howto" to "HowTo" in the path names. Update
// the TypeFacerHelp.jar with this modified file.
// If you don't make these changes, the Table of Contents will show,
// but not the actual help text. - GHP

// Find out what your current directory is
URL URL1 = new URL((new File(".")).toURL(), "TFHelp/TypeFacerHelp.jar");
System.out.println(URL1.toString());
String userdir = URL1.toString();

// The userdir string is "file:D:..... It seems to work, but I
// am removing the "" before the "D:" GHP
userdir = "file:"+userdir.substring(6);

// This must be done on Windows systems - can't hurt - GHP
userdir = userdir.replace('\', '/');
System.out.println("userdir = "+userdir);

URL x[] = { new URL(userdir) };
ClassLoader cl = new URLClassLoader(x);
String hsName = "HelpSet.hs";
URL hsURL = HelpSet.findHelpSet(cl, hsName);
System.out.println("hsURL ok");

hs = new HelpSet(null,hsURL);
hb = hs.createHelpBroker();

System.out.println("Found help set at " + hsURL);

Anonymous