[kaffe] How to change the default compiler from kjc to others

Dalibor Topic robilad at kaffe.org
Tue Jan 10 12:24:33 PST 2006

ktlam at cs.hku.hk wrote:
> Hi, 
> Thanks a lot for your reply. 


> Well, the reason is I am working on a project to make a kaffe-1.0.6-based JVM 
> called Jessica2 to be able to support Tomcat and Axis. But the source base for 
> 1.0.6 and the current version differ too much. 

Indeed. First of all, let me say that I think Jessica 2 from reading the
papers, sounds really great, and I'd love to see parts of it merged in
eventually. I'm glad that it is being actively developed further, and I
hope we can assist you to gradually bridge the gap between 1.0.6 and
later versions of Kaffe. :)

> Do you think this can be fixed by porting a later version of Classloader.java 
> as well as the java.security.* things? 

I'd hope so, yes. The hardest part would be the native side of the
ClassLoader,  which you may need to re-adapt to use Jessica 2's
threading/memory allocation/etc. functions (assuming you use your own
threading and gc subsystems).

The Java side should be easier to pull over, in general, but you may
have to replace some classes with their 'newer' counterparts until
everything compiles nicely.

> I am not sure if the kjc compiler will 
> refer to the kaffe's java library for compilation of JSP. Or it's due to 
> missing method in kjc internal. Do you think changing to another compiler can 
> solve this?

I'd recommend trying out jikes for tomcat's jsps. Beside being faster
locally, it seems to work quite well with recent Kaffe versions and
tomcat 4/5. As Tomcat 4 and above uses Ant internally to take care of
JSP compilation, you'll need to tell Ant to use jikes explicitely, by
setting the build.compiler=jikes property.

> Also, later version has used rt.jar instead of Klasses.jar. 
> This makes the porting difficult.

Yes, we've switched the name to rt.jar later, since some tools seem to
expect a JDK-like file layout (and naming) in order to work properly.
Both rt.jar and Klasses.jar are conceptually the same: the core class
library archive. But as some applications don't run with Klasses.jar,
run when they find a file called rt.jar, we've chosen to use the more
common name.

> I wish to ask during kaffe install, will Klasses.jar be re-created using 
> source or just moved out the pre-compiled jar file. If the later, then I can 
> create a new pre-compiled one and no need to change the make.in etc setting. 

I am not sure I understood the question. Could you elaborate?

dalibor topic

More information about the kaffe mailing list