JAVA2HTML(1) | General Commands Manual | JAVA2HTML(1) |
java2html - generates highlighted html-files from Java or C++ source
java2html [options] [filename...]
This manual page documents how to use java2html. If no arguments are given on the command line of java2html, it reads from stdin and writes to stdout.
If invoked with filenames as arguments java2html will write it's output into new files. Names of output files are generated by appending ".html" to the corresponding input filename.
java2html can be installed as a CGI program and convert source files on the fly. In order to set this up for apache the webmaster has to add the two lines
to the webserver configuration file. java2html depends on the webserver properly setting environment variable PATH_TRANSLATED to the pathname of the source file. If java2html has been compiled with option -DCOMPRESSION=1 then it will invoke gzip to compress the generated HTML before sending it to the requesting browser. Of course java2html takes care to check if the browser accepts gzip encoding.
#! /bin/sh
echo "Content-type: text/html"
echo ""
echo "<html>"
echo "<head><title>$PATH_TRANSLATED</title>"
echo "<meta name=\"generator\""
echo "content=\"`java2html -V`\">"
echo "</head>"
echo "<body>"
echo "<h1>Source of $PATH_TRANSLATED</h1>"
echo "<ul>Structures and functions"
cat $PATH_TRANSLATED | java2html -isc
echo "</ul>"
echo "<hr></hr>"
cat $PATH_TRANSLATED | java2html -sc
echo "</body></html>"
exit
<A HREF="foo.java.html#line301">Go to line 301</A>
java2html returns 0 on success, 1 if input files are not existing/readable, 2 if output files are not creatable/writable, 3 if invoked with illegal options and 4 if gzip cannot be invoked.
Florian Schintke <schintke@cs.tu-berlin.de>
Martin Kammerhofer <mkamm@gmx.net> wrote the CGI feature.
Rob Ewan <rob@ewan.com> wrote the indexing feature.