This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Compiling Servlets to native code with GCJ (and Tomcat)


"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
jsturm@sigma6.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]