tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubble, Christopher" <>
Subject RE: Tomcat JRE vs JDK Issue
Date Tue, 16 Nov 2004 15:46:38 GMT
How does one precompile the JSPs?  Then I should be able to use TC with just
a JRE, correct?  Once TC is deployed, there should not be any need for
changes to it, so it's fine to precompile the JSPs.


-----Original Message-----
From: Shapira, Yoav []
Sent: Tuesday, November 16, 2004 10:50 AM
To: Tomcat Users List
Subject: RE: Tomcat JRE vs JDK Issue


>One of the things the JDK brings that the JRE does not is tools.jar
>which contains, which is needed to compile JSPs.


>It might be possible to use the JRE as long as you have tools.jar from
>the JDK somewhere in your classpath. It seems like I saw a thread
>related to this a while ago, although I don't know if it works.

It does for many cases, but not all (there are tricky
classloader-related cases if using a JRE/lib/ext or sealed jar), and
that's why it's not recommended now and was never officially supported.

>Is there a compelling reason to want to use the JRE rather than the
>full JDK?

There are two that come to mind.  One is that the JRE is smaller,
lighter in footprint, and easier to install.  The second is probably
more significant, and it is that anyone can redistribute a JRE for
commercial use, but not a JDK.  The latter is a license violation.  So
if you're creating a shrink-wrapped product, you can't bundle the JDK
with it (unless you get a special license and pay royalties to Sun), but
you can the JRE.  This is a good reason for JSP pre-compilation in and
of itself.

All of the above applies only to the Sun JDK and JRE.  There are
alternatives, such as the IBM, JRockit, Blackdown JDKs, and the Jikes
compiler.  Tomcat works with all of these, and they have different
license restrictions for redistributions.

Of course, Tomcat 5.5 largely avoids this issue altogether.  Tomcat 5.5
requires only a JRE, and bundles Eclipse's JDT compiler, which is free
for redistribution.  So you can bundle Tomcat 5.5 with a JRE, not
pre-compile JSPs, and still be able to sell your package without
violating any license or paying any royalties.

Yoav Shapira

This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message