GCJ and J2ee

Fernando Lozano fernando@lozano.eti.br
Wed Jun 15 17:50:00 GMT 2005

Hi Craig,

> We have integrated Spring, Jetty, and Velocity all on a SBC running 
> embedded Linux.  We compiled the Spring et al. under gcj 3.3 to native 
> xscale object code.  It works beautifully - it's fast and reliable, 
> with all of the Spring functionality intact.
> JSP is potentially a big problem, although it might work.  Remember 
> that JSP uses the JDK to compile servlets, one for each JSP page. Hard 
> to believe, but that's how it works.  For this reason we avoid JSP 
> like the plague, and use Velocity.  Velocity is much easier to use

If you want or need JSP support, using jikes or another Java compiler 
should be fine (I guess recent Tomcat releases should use gcj also, as 
they use Ant support for java compilers). But the code would then be 
interpreted using gij / libgij. It would be interesting to hack Tomcat 
Jasper (or another JSP compiler) to use gcj, specially with gcj 4.0 
hability to find the native so for a given class.

Another option is to use the Tomcat Deployer to pre-compile JSP pages, 
so you have no JSP at all on the final war, but just servlets.

[]s, Fernando Lozano

More information about the Java mailing list