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

ktlam at cs.hku.hk ktlam at cs.hku.hk
Wed Jan 11 08:26:10 PST 2006


Hi,

I am really glad to hear from your supportive reply. 
Thanks a lot first of all. 

If you are interested, you can visit below for more information: 
http://www.cs.hku.hk/~ktlam/mscproject.htm

In fact, Jessica2 is really a great product and attract my attention to this 
project. But it is sad that Jessica2 missed out quite a number of 
classes/libraries. I aim to make it be able to support some latest practical 
applications besides speeding up scientific computations. My wish is to speed 
up web services or intensive web applications, XML processing. 

Currently, Jessica2 can support Tomcat 3.2.4. I am not sure if Axis can run on 
Tomcat 3.x. Jessica2 failed to support Tomcat 4.x.  

The error is e.g.: 

ERROR reading /home/ktlam/tomcat401/conf/server.xml
At Line 131 /Server/Service/Engine/Realm/ 
className=org.apache.catalina.realm.MemoryRealm 

Catalina.start: java.lang.ClassNotFoundException: 
java/security/cert/X509Certificate
java.lang.ClassNotFoundException: java/security/cert/X509Certificate
        at java.lang.Class.getMethods0(Class.java:native)
        at java.lang.Class.getMethods(Class.java:188)
        at org.apache.catalina.util.xml.SetProperties.setProperty
(XmlMapper.java:665)
        at org.apache.catalina.util.xml.SetProperties.start(XmlMapper.java:650)
        at org.apache.catalina.util.xml.XmlMapper.matchStart
(XmlMapper.java:412)
        at org.apache.catalina.util.xml.XmlMapper.startElement
(XmlMapper.java:91)
        at org.xml.sax.helpers.XMLReaderAdapter.startElement
(XMLReaderAdapter.java:329)
        at org.apache.xerces.parsers.SAXParser.startElement
(SAXParser.java:1376)
        at org.apache.xerces.validators.common.XMLValidator.callStartElement
(XMLValidator.java:1214)
        at org.apache.xerces.framework.XMLDocumentScanner.scanElement
(XMLDocumentScanner.java:1806)
        at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch
(XMLDocumentScanner.java:1182)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome
(XMLDocumentScanner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
        at org.xml.sax.helpers.XMLReaderAdapter.parse
(XMLReaderAdapter.java:223)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:290)
        at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:228)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        at java.lang.reflect.Method.invoke(Method.java:native)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)


For my last point in previous mail, I am a newbie to autoconf or automake, 
those make.am, etc seem having to be updated if I want to add new java sources 
(e.g. java.security.*) to the Klasses.jar file. 

My last question is to ask, during make install, will the Klasses.jar be 
compiled from the libraries\javalib\java\* sources, or it will just put the 
pre-compiled Klasses.jar from libraries\javalib to the target directory rather 
than building from sources?

Also, in fact, it seems better to rename Klasses.jar to rt.jar. But it seems 
difficult for me to revise the configuration (don't where to start). Any good 
idea?

Thanks and Regards,

King Tin


Quoting Dalibor Topic <robilad at kaffe.org>:

> ktlam at cs.hku.hk wrote:
> > Hi, 
> > 
> > Thanks a lot for your reply. 
> > 
> 
> Hi,
> 
> > 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?
> 
> cheers,
> dalibor topic
> 
> 




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/




More information about the kaffe mailing list