Javadoc To CHM is a Python tool that generates Microsoft HTML Help projects files from a Javadoc documentation. It generates the project file (.HHP), the contents file (.HHC) and the index file (.HHK). After having generated the HTML project files, Jd2chm invokes the Microsoft HTML Help Compiler (hhc.exe) with the project file (.HHP) as parameter in order to build the Compiled HTML file (.CHM).

Although still relevant, this article is about jd2chm until version 0.3. More recent versions of jd2chm are available on GitHub.



J2SE 6.0 - CHM file on Windows XP (generated with Jd2chm 0.3)

Notes About Jd2chm Version 0.3

Jd2chm 0.3 does not have a documentation other than the following sections. You can also access the slightly outdated jd2chm 2.0 documentation, jd2chm_doc.html, or jd2chm02.pdf. Feel free to contact the author if you have any question.


Jd2chm 0.3 includes many improvements. Here is a brief list of the new Jd2chm features and improvements:

  • Distributed in two formats:
    • Python script, []((, for those who already have Python installed on their computer
    • Win32 executable version,
  • The executable version was prepared with the McMillan Installer. See section Resources for related resources
  • Script compatible with Python 2.2 and 2.3
  • Performance improvement: the parsing does not use any more the HTML parser but only regular expressions
  • The Microsoft HTML Help Compiler is required (see Javadoc To CHM Resources)
  • Detection of the Microsoft HTML compiler
  • Starts automatically the CHM compilation
  • Moving the full JDK Javadoc API to a temporary directory is not needed any more
  • Tested successfully against the Javadoc APIs from both J2SE 1.4.2 and J2SE 1.5.0 Beta 2
  • The CHM Table of Contents is generated as binary for performance purpose, but the icons used can only be the default one
  • The CHM Table of Contents includes the methods (was limited to the Java classes until version 0.2)
  • Addition of the non public inner classes in the Table of Contents
  • Light logging implementation
  • The CHM files generated may be open on Linux with xCHM


  1. Download either the python script package or the executable package
  2. To install the script package, extract the 2 files from and copy them into a directory included in your PATH
  3. To install the executable version, extract jd2chm.exe from and copy this file into a directory included in your PATH.


  1. Open a command line in a Javadoc API directory.
  2. Type jd2chm followed by [Enter].
  3. Enter prompted informations, as in the following example:
jd2chm Version 0.3
Copyright (c) 2000-2004 Andre Burgaud
The project name will be given to:
- The HTML Help project files (.HHP, .HHK, .HHC)
- To the final CHM file
Enter the project name: bsh
The project title will be assign to the CHM window
Enter the project title: "Beanshell API"
[11-08-2005 14:21:44] INFO      Starts building the project
[11-08-2005 14:21:44] INFO      Project: bsh
[11-08-2005 14:21:44] INFO      Title: "Beanshell API"

Running the script with the option -h will display the usage.


jd2chm_py_03.zipPython script Jd2chm (requires Python 2.2 or greater)
jd2chm_exe_03.zipJd2chm in binary format (does not require Python to be installed on your machine)
jd2chm02.zipJd2chm Version 0.2
jd2chm01.zipJd2chm Version 0.1


  • Java is a trademark or registered trademark of Sun Microsystems, Inc. in the U.S. and certain other countries.