running Java applications within kaffe (Re: [kaffe] shutdownHook changes broke the build)

Guilhem Lavaux gxl at
Wed Jul 9 08:26:01 PDT 2003

Dalibor Topic wrote:

> hi Guilhem,
> I've just checked in a patch that fixed the remaining compilation problems for
> me. It now builds fine for me, but the shutdown hook test still fails.
> My patch changed the compile method of kaffe/tools/compiler/Compiler_kjc and
> Compiler_pizza classes to return false only when an exception occurs. But I
> don't think that kjc or pizza always throw an exception before they fail to
> compile some code, so my implementation of compile() smells funny ;) On the
> other hand, I don't think there is a way to get the exit codes of applications
> ra within kaffe as their calls to Runtime.exit() should shutdown the whole
> virtual machine.

See you commit it ! You are quick :-).

> so could you try again with the latest set of sources, and check if it makes
> things any better?

Hmmm , I cannot test it until this evening. I'll tell you later.

> Anyway, I'm not sure if running several java applications within a single kaffe
> instance is a good idea, as long as kaffe doesn't implement some of process
> separation features from JanosVM.

Maybe I should have a look at it ...

> So for example, what happens when an application calls runtime.exit()? It
> shouldn't shut down the whole machine, unless it's the only application
> running. It shouldn't run the finalizers of objects not belonging to it, and
> only run its own shutdown hooks. The exit code should be stored for later
> retrieval. I assume Tim could come up with further pitfalls. ;)
> The apperently simple, but slow & fat way out is to just use Runtime.exec to
> start another instance of a JVM. What do you think?

Well, running Runtime.exec is obviously the securest of all possibilities but it should
be great also to have embedded Process directly in the VM, again I should have a look
at JanosVM.

> cheers,
> dalibor topic



More information about the kaffe mailing list