[kaffe] gjdoc, libxmlj and kaffe

Mark Wielaard mark@klomp.org
Sat Dec 6 05:31:02 2003


--=-grFO6HG1Z7f3qvexbfay
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,

Played a bit with kaffe, gjdoc and libxmlj.
It works mostly. But is difficult to setup since gjdoc and libxmlj
haven't seen real releases so you have to get them from CVS. But savnnah
is still down so that is kind of hard. For now I have put up my local
copies at http://www.klomp.org/mark/classpath/ so people can play with
it a bit.

Making libxmlj should be easy with just a make && make install (maybe a
configure first).

Dalibor said that he could use the ant build.xml file for gjdoc, but the
Makefile is broken. I just did a:
$ cd src
$ mkdir classes
$ jikes-classpath -d classes `find * -name *.java`
$ cd classes
$ fastjar cf ../../gjdoc.jar *

Then to produce API documentation for all of GNU Classpath do something
like:
$ cd ~/src/classpath
$ find java javax -type d ! -regex .*CVS ! -regex .*doc-files | tr '/' '.' =
| grep -v "java.awt.dnd.peer" | grep -v "java.awt.peer" > /tmp/packages
$ cd /tmp
$ mkdir doc
$ cd doc
$ LD_LIBRARY_PATH=3D/usr/local/libxmlj/lib time kaffe -mx256M -classpath /h=
ome/mark/src/gjdoc/lib/gjdoc.jar:/home/mark/src/gjdoc/src/resources:/home/m=
ark/src/libxmlj gnu.classpath.tools.gjdoc.Main -noemailwarn -sourcepath /ho=
me/mark/src/classpath -d . `cat /tmp/packages`

Starting out with just one package (like java.lang) will give you
results quicker, see obligatory screenshot:
http://www.klomp.org/mark/classpath/Screenshot-4.png

Doing the whole thing seems to go OK at first. But after two hours of
happily generating HTML files it gives:

Generating HTML Documentation for java.awt.geom.QuadCurve2D...
Generating HTML Documentation for java.awt.geom.QuadCurve2D.Double...
I/O error : flush error
java.lang.ArrayIndexOutOfBoundsException
   at gnu.xml.libxmlj.transform.LibxsltStylesheet.libxsltTransform (Libxslt=
Stylesheet.java)
   at gnu.xml.libxmlj.transform.LibxsltStylesheet.transform (LibxsltStylesh=
eet.java:112)
   at gnu.xml.libxmlj.transform.TransformerImpl.transform (TransformerImpl.=
java:235)
   at gnu.classpath.tools.doclets.xmldoclet.doctranslet.DocTranslet.apply (=
DocTranslet.java:198)
   at gnu.classpath.tools.doclets.xmldoclet.Driver.instanceStart (Driver.ja=
va:1094)
   at gnu.classpath.tools.doclets.xmldoclet.Driver.start (Driver.java:232)
   at java.lang.reflect.Method.invoke0 (Method.java)
   at java.lang.reflect.Method.invoke (Method.java:255)
   at gnu.classpath.tools.gjdoc.Main.startDoclet (Main.java:408)
   at gnu.classpath.tools.gjdoc.Main.start (Main.java:612)
   at gnu.classpath.tools.gjdoc.Main.main (Main.java:480)
ERROR: java.lang.ArrayIndexOutOfBoundsException
Done.
1068 warnings
7537.15user 26.38system 2:07:27elapsed 98%CPU (0avgtext+0avgdata 0maxreside=
nt)k
0inputs+0outputs (1199major+30340minor)pagefaults 0swaps

Of course just generating api documentation for just this one class or
just the java.awt.geom package works fine. So the only way to reproduce
this seems to be generating the whole thing again and wait another 2
hours. Sigh.

The I/O error : flush error seems to come from kaffe/kaffevm/jar.c
getDataJarFile(). A quick look indicates that the result of this
function is not checked in for example kaffe/kaffeh/support.c, but I
don't know if that is related.

Cheers,

Mark

--=-grFO6HG1Z7f3qvexbfay
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/0dnZxVhZCJWr9QwRAlKtAJ0cAGIN+RvIsuG77IThXmn1rHHJ7ACgpbvY
qdsPIitoss9Fqo3lfxxOuBs=
=dNHL
-----END PGP SIGNATURE-----

--=-grFO6HG1Z7f3qvexbfay--