Software by Allen Holub

License Agreement

The software listed here is copyright Allen I. Holub. It may be used freely by yourself with the following restrictions:

  1. Your splash screen, about box, or equivalent, must include Allen Holub's name, copyright, and URL. An acceptable message would be:
    This program contains Allen Holub's Zip-archive utility.
    (c) 2003 Allen I. Holub. All Rights Reserved.

    If your program does not run interactively, then the foregoing notice must appear in your documentation.
  2. You may not redistribute (or mirror) the source code.
  3. You must report any bugs that you find to me. Use the form at /company/contact.html or send email.
  4. The software is supplied as is. Neither Allen Holub nor Holub Associates are responsible for any bugs (or any problems caused by bugs, including lost productivity or data) in any of this code.


Some of the code from published articles and books has changed as I've fixed bugs, added features, etc. All the files should go through javadoc without difficulty, and I strongly recommend that you build a javadoc tree from the sources (and read through it) before using the classes I've provided. I run javadoc with the following command-line switches:
-source 1.4 Use this flag if you're not using Java 5 (aka 1.5). Sources use JDK 1.4 language extensions.
-breakiterator Use the new algorithm for recognizing the end of the first sentence.
-classpath c:/src The classpath for the executables.
-sourcepath c:/src The root directory of the source directories. Sources for com.holub.ui are in c:/src/com/holub/ui, for example.
-public Document only public methods.
-d /docs Put the javadoc files in the /docs directory.
-link file:/$JAVA_HOME/docs/api Where to find the JDK api documentation. Including this switch will give you links to the standard docs from the tool docs. Use %JAVA_HOME% for windows.

Downloading and Executing

Some of the java software is packaged in an executable jar file that demonstrates how it works. Normally this is a convenience since it lets you check out the software with a "java -jar file." Your browser may may want to execute the file rather than downloading it, however. Should this happen, just right click on the link and pick "Save target as" or equivalent.

Software from Books

Holub on Patterns: Learning Design Patterns by Looking at Code

This link gets you to the main page for the book. You'll find links to patterns-related subjects and the code. Here are direct links to pages for the programs discussed in the book:
The Game of Life
An implemenation of Conway's Game of LIfe along with an applet for Life and other useful information.
Holub SQL
A small embeded (linked into your own program rather than running as a server) SQL interpreter, suitable for small applications.

Software for Compiler Design in C

This is the C source code for Allen's versions of Lex, yacc, and a C compiler described in his book Compiler Design in C

Software for Taming Java Threads

The complete threading library described originally in a series in JavaWorld, then in his book Taming Java Threads

Software from Various Articles

This section contains the software accompanying various published articles.

Date-selection widget

This executable jar file contains source and executables for the original version of date-selection widget that looks like the picture at right. It's described fully the article Solve the date-selection problem once and for all, published in July, 2003 JavaWorld. Find a slightly updated version of the code in the HTMLPane archive, discussed below.

Specify Dialog Boxes in HTML (HTMLPane)

This .jar file contains the source from HTMLPane class, which lets you specify client-side dialog boxes (or equivalent) in HTML. The code is explained in depth in Create client-side user interfaces in HTML Part 1 and Part 2.

The code demonstrates how to modify java.swing.JEditorPane to support custom tags, among other things. The archive also includes a modified version of the data-selector class, discussed above. (The main difference is that I've changed the name to DateSelector to stop people from griping about my time-honored, but seemingly unfashionable, use of underscores in identifiers.)

Software for other Articles

Find links to the software from other articles on the Publications:Articles page.