Subject: Re: Compiling Servlets to native code with GCJ (and Tomcat)
From: Jeff Sturm <[email-masked]>
To: "Gust, Micron" <[email-masked]>
Cc: "[email-masked]" <[email-masked]>
Date: Thu, 10 Feb 2000 14:26:14 -0500

"Gust, Micron" wrote:
> I am trying to use gcj to compile Java servlets. What I've heard is that you
> need to compile both the servlet engine and the servlet into one executable.
> So I've decided to try this using Apache's Tomcat servlet engine.

You'll have trouble doing this with gcj, since Tomcat relies on object
serialization and RMI (IIRC), which aren't currently supported by
libgcj.

> I downloaded both the .class files and the source code, but I don't know how
> to begin the compilation since there are so many .class files. I have looked
> at the source code, but I don't know which main method is the entry point
> into the application.

But to answer your question, compile class files as you would sources:

  gcj -O2 -c *.class
  gcj -O2 *.o --main=name-of-main-class -o name-of-executable

Find out how Tomcat is invoked (there is probably a shell script
somewhere).  The main entry point should be identified by the `java'
command line.

-- 
Jeff Sturm
[email-masked]

--
Want to unsubscribe from this list?
Send a message to [email-masked]