I run out of memory — how much is needed, exactly how do you at Java Software call Javadoc, and how long does it take?
Javadoc does take a lot of memory because (unlike javac) it must simultaneously load all the classes being documented, plus any that are referenced (such as superclasses and superinterfaces). Javadoc 1.1.x uses 40 MB of memory to generate the JDK 1.1.x documentation (22 packages). Javadoc 1.2 requires 120 MB of memory to generate the JDK 1.2 documentation (55 packages), which takes 8 minutes on an Ultra Enterprise with 512 MB of memory. Generating docs for all our public classes including sun.* (129 packages) requires 200 MB and takes 15 minutes on that same machine. The javadoc 1.1.x command is shown with the -J-mx40m option below. Also, there is a bug in JDK 1.1.2 (fixed in 1.2), where the “ms” value must be smaller than (not equal to) the “mx” value. Without showing the complexity of environment variables and paths, the following is effectively the command that we run on the JDK 1.1 source code: javadoc -J-ms39m -J-mx40m \ -classpath /usr/latest/build/solaris/classes \ -d /usr/lates