public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Compiling Servlets to native code with GCJ (and Tomcat)
@ 2000-02-10 10:13 Gust, Micron
  2000-02-10 10:25 ` Jeff Sturm
  0 siblings, 1 reply; 4+ messages in thread
From: Gust, Micron @ 2000-02-10 10:13 UTC (permalink / raw)
  To: cygwin@sourceware.cygnus.com

Hi,

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.

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.

Can someone point me in the right direction?

Thanks,

Micron


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compiling Servlets to native code with GCJ (and Tomcat)
  2000-02-10 10:13 Compiling Servlets to native code with GCJ (and Tomcat) Gust, Micron
@ 2000-02-10 10:25 ` Jeff Sturm
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Sturm @ 2000-02-10 10:25 UTC (permalink / raw)
  To: Gust, Micron; +Cc: cygwin@sourceware.cygnus.com

"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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Compiling Servlets to native code with GCJ (and Tomcat)
  2000-02-10 10:33 Gust, Micron
@ 2000-02-10 10:50 ` Jeff Sturm
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Sturm @ 2000-02-10 10:50 UTC (permalink / raw)
  To: Gust, Micron; +Cc: cygwin@sourceware.cygnus.com

"Gust, Micron" wrote:
> Do you know of any servlet engines that only use what's supported in Libgcj
> and that would be easier to compile with gcj?

I'd look at Apache JServ.  It has inner classes, which gcj can't yet
compile from source, but it should compile the bytecode just fine.

-- 
Jeff Sturm
jsturm@sigma6.com


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Compiling Servlets to native code with GCJ (and Tomcat)
@ 2000-02-10 10:33 Gust, Micron
  2000-02-10 10:50 ` Jeff Sturm
  0 siblings, 1 reply; 4+ messages in thread
From: Gust, Micron @ 2000-02-10 10:33 UTC (permalink / raw)
  To: cygwin@sourceware.cygnus.com

Do you know of any servlet engines that only use what's supported in Libgcj
and that would be easier to compile with gcj?

-----Original Message-----
From: Jeff Sturm [ mailto:jsturm@sigma6.com ]
Sent: Thursday, February 10, 2000 1:26 PM
To: Gust, Micron
Cc: cygwin@sourceware.cygnus.com
Subject: 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


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-02-10 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-10 10:13 Compiling Servlets to native code with GCJ (and Tomcat) Gust, Micron
2000-02-10 10:25 ` Jeff Sturm
2000-02-10 10:33 Gust, Micron
2000-02-10 10:50 ` Jeff Sturm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).