Class tree compilation "from zero"

golubovsky at golubovsky at
Mon Aug 16 01:47:23 PDT 1999

Earlier I wrote about my attempt to borrow Kaffe Java classtree into my
project. Now for purity I try to compile it "from zero" assuming that I
compile some essential classes first, and all the rest will be compiled "in
batch" with possible repetitions. My classtree is assumed to be empty

I see that this is not a simple task ;) I use pizza to compile with its
classpath set to my new classes tree; kaffe's VM classpath is one hardcoded
into it i. e. Klasses.jar.

One "non-pure" way is to compile with Klasses.jar included into the pizza's
classpath. But we come into problem when Kaffe's and my classes have the same
name but different methods: in different moments pizza will use different
classes with the same name depending on presence of my class.

Also I removed any kind of native interface from my project: native interface
is strictly limited to the syscalls level; almost everything else (except
maybe Object.class, Class.class and Thread.class) is desired to be java-coded.
When pizza meets a class with native methods it tries to load a library which
for sure is absent (my VM must be built statically, I even plan to refuse of
using libc because of no need in it); then pizza refuses to proceed with that

Of course I may build a "stub" library to cheat pizza but this is not a good

To summarize my question: does there exist a java compiler which is able to
compile java sources on completely foreign tree and which may be forced
manually to ignore the absence of some referred classes or their native

I understand that such a question may be a bit irrelevant to this list.
However Kaffe developers probably once came to the same point when they needed
to compile the class tree the first time. Probably Sun also worked out the
similar situation ;)

Probably such a compiler must be written in C... Does anybody know about such
a compiler (opensource) other than guavac?

Dmitry M. Golubovsky
      St-Petersburg, Russia

More information about the kaffe mailing list