TH is a hyperlink validator. It opens an HTML file on a local disk, searches it for hyperlinks to remote World Wide Web sites, tries to connect to each one found, and writes a report on each failed attempt directly into the file examined (as an HTML-comment). TH is very fast, because of its capability of concurrently checking many links. TH is a console Java application; it can run on any computer with Java Virtual Machine compatible with Sun Microsystems JDK 1.1.1 or later installed.
Have you ever tried to maintain HTML pages containing many links (aka
hyperlinks or hyperreferences) to other Web sites? If your answer is
"yes", then you will agree that fixing the links that have become
invalid since you added them to the page is quite a chore. A whole bunch of
utilities have already been written to help you track down such bad links, and
TH is yet another such utility. It reads an HTML file from a local disk, finds
href="http://hostname/filename"> tags in it,
tries to connect to each
hostname, and reports each
attempt's results. However, TH has a number of features making it especially
useful to the experienced web author/designer:
<!--...-->comment right after the corresponding hyperlink tag. This makes it very easy to find and fix the wrong links in the subsequent review session.
atcommand, and so on.
TH is freeware (of course, I don't mind it if you send me a
check for a few bucks, but I don't really think TH' users' donations are going
to make me rich). Use TH on your own risk. Respect the author's rights. Feel
free to re-distribute it on a non-commercial basis as it is, with this
th-docs.html file attached. TH's source code is available
for $100 upon request, if you are not going to re-destribute
it (contact the author).
READMEfile accompanying the JDK package. You can download JDK from the following sites:
classessub-directory (aka "folder") under the directory at which the JDK is installed. For example, if on a PC with Microsoft Windows 95 JDK is installed at
c:\jdk1.1.1\classesshould be created (if it does not yet exist).
th1.1b.zipfile into the
classesdirectory with any unzip utility capable of handling long file names. The directory structure stored in the zip file should be restored. Having unzipped the file, you will find
classesdirectory, and several
*.classfiles in the
CLASSPATHaccordingly (or run TH from the directory where the
TH.classis placed). Refer to the JDK's documentation to find info on setting
th.icois included with the TH package so you can assign the icon to the batch file running TH.
java [java-options] TH [-fd] [-th:nn] [-to:xxx] [filename]
NOTE: If you are using Microsoft's Java, type jview instead of java.
The command-line parameters enclosed in the  are optional.
java-optionscontrol how the Java Virtual Machine runs the application. Consult the JDK's documentation to find info on these options.
While TH is running, it writes a progress report to the standard output
device, i.e., to the console, if the output is not redirected. After it
finishes the job normally, it saves the original HTML file as
filename.TH.bak, and writes reports on all failed
hyperlinks directly into
filename, the HTML file
examined. Each report is timestamped and placed as a
<!--...--> comment right after the corresponding hyperlink
tag so you can easily locate and fix the wrong links later. An example of such
a comment is shown below:
<A HREF="http://jchemed.chem.wisc.edu/DynaPub/DynaPub.html"> <!--TH (Fri Sep 19 05:19:29 PDT 1997): File not found.-->
If you want to stop TH, press Ctrl-C (if you're running it in a multi-window environment, make TH's console window active first). The Java Machine will terminate TH, and the original HTML file will be left intact.
TH returns a status code of 0 if no errors were found in the file tested, 1 if errors were found, and 10 or higher if the test could not be completed.
NOTE:To check an HTML file more thoroughly, it often makes sense to run TH on the same file more than once and compare older error reports with the newer ones, because some of the WWW servers reported unavailable can become available later, and vice versa.
Last revised: December 27, 1997
Sun, Sun Microsystems, and Java are trademarks of Sun
Microsystems, Inc. Windows, Windows 95, and Windows NT are trademarks of
Microsoft Corporation, Inc.
Sun, Sun Microsystems, and Java are trademarks of Sun Microsystems, Inc. Windows, Windows 95, and Windows NT are trademarks of Microsoft Corporation, Inc.