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
all the <a
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.at
command, 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).
README
file
accompanying the JDK package. You can download JDK from the
following sites:
NOTE: On WinNT/95 platforms you can also use
a JDK 1.1-compatible Java machine from Microsoft.
By the way, installing JDK will allow you to run not only TH, but also
other Java applications. As the number of Java
applications on the market is growing fast, having JDK installed on your
computer is a good idea, even though you are not going to become a Java
programmer.
classes
sub-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
,
then c:\jdk1.1.1\classes
should be created (if it does not
yet exist).
th1.1b.zip
file into the classes
directory 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
th-docs.html
(this file), TH.class
and
th.ico
in the classes
directory, and several
*.class
files in the classes\thinternal
sub-directory.
CLASSPATH
accordingly
(or run TH from the directory where the TH.class
is placed).
Refer to the JDK's documentation to find info on setting
CLASSPATH
.
th.ico
is 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-options
control 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.
dima@mch.chem.msu.su
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.