The class Java2Html.class converts java source code to formatted HTML.
I'm assuming that if you intend to use this you're a Java programmer, so you already know that the class files should be somewhere on your CLASSPATH. If you run:
java Java2Html foo.java
the program generates an HTML file foo.java.html on your current directory.
In addition, note the following:
1) The included file null.gif must be included in the same directory as your HTML files for them to be rendered properly. That 43-byte gif is nothing but a single-pixel transparent gif, that infamous hack for spacing text in HTML.
2) The program looks for a Java2Html.properties file first in your current working directory and then in the directory where the Java2Html class is located. This allows you to have default colorizing preferences but override them in specific cases by having a different properties file in your current working directory.
3) You can change the paramaters in the properties file to adjust the generated output according to your preferences.
4) The program is free. You can have the source code too, but I'm not automatically including it. You can drop me an e-mail at jrevusky@bigfoot.com and I'll send it to you on the condition that you send me any improvements you make to it. I think that's reasonable.
There are certain things that the program does not handle perfectly. Specifically, it may trip up on 1.1 syntax such as arbitrarily nested local classes and nested static initializers, which maybe one shouldn't abuse anyway. Those are a little bit tricky. And I'm sure there are other glitches to be fixed. But the program can still be pretty useful as is. And I (or someone else) may get around to fixing those things.
Jonathan Revusky
jrevusky@bigfoot.com
Sitges (Barcelona) Spain
January 1998