[kaffe] How to change the default compiler from kjc to others
ktlam at cs.hku.hk
ktlam at cs.hku.hk
Tue Jan 10 09:08:54 PST 2006
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.
I hit the error of unable to compile class for JSP due to Cannot find
method "getProtectionDomain()" when running happyaxis.jsp.
I see this method in Classloader.java in later Kaffe version (e.g. 1.1.4) java
library.
Do you think this can be fixed by porting a later version of Classloader.java
as well as the java.security.* things? 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?
Also, later version has used rt.jar instead of Klasses.jar.
This makes the porting difficult.
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.
Much Thanks for Help.
King Tin
Quoting Dalibor Topic <robilad at kaffe.org>:
> ktlam at cs.hku.hk wrote:
> > Dear all,
> >
> > Due to some reasons, I have to use an older version of Kaffe 1.0.6.
> >
>
> Hi,
>
> I'm a little curious what the reasons are :)
>
> > I wish to ask is it possible to change its default compiler from kjc to
> > others?
>
> I assume you are talking about the installed javac compiler wrapper,
> i.e. Kaffe's bin/javac which delegates to kjc.
>
> If you want to change it, you need to patch the javac.in file (which is
> either in kaffe/scripts or a subdirectory of it) to invoke the compiler
> you want to use, and may have to set the right options to set the
> bootclasspath, etc.
>
> For an example for jikes, see the javac.in file in Kaffe 1.1.6. It
> should be similar for other compilers (ecj, etc.). If you want to use
> jikes transparently in tomcat via ant (i believe that's possible in
> tomcat 4 and later), I'd recommend pre-setting build.compiler property
> to jikes.
>
> > If yes, then how? Also, could you recommend a good open-source
> > compiler other kjc? Can jikes do?
>
> Jikes (1.22) works fine for many cases, but it does not seem to be very
> actively maintained at the moment.
>
> Besides jikes, I'd recommend ecj, eclipse's compiler, if you need a
> compiler written in Java. See FAQ.classlibrary-compile in CVS head for
> more information on where to get it, etc.
>
> cheers,
> dalibor topic
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
More information about the kaffe
mailing list