Apache Tomcat / Tomcat based apps

Igor Peshansky pechtcha@cs.nyu.edu
Sun May 21 21:47:00 GMT 2006

On Sun, 21 May 2006, Joshua Daniel Franklin wrote:

> > On Sun, 21 May 2006, Christopher Molnar wrote:
> > > I would like to find out if it is possible to create a dependency in
> > > a package on the sun java sdk. For example the default install of
> > > Java 1.5 from Sun uses a home directory of: "/cygdrive/c/Program\
> > > Files/Java/jdk1.5.0_06" , so keying on the presence of that
> > > directory is a good bet Java is installed with the correct version.
> On 5/21/06, Igor Peshansky wrote:
> > You can have a configuration script that contains a path to the Java
> > SDK, which the users can edit, and install it from a default location
> > if not present.  As long as the only thing in that script is the Java
> > SDK location, you should never have to replace it on installation.
> > Sure, the package won't work OOTB, but configuration is as easy as
> > putting one path in, say, /etc/tomcat.java.cfg (invent the name, there
> > isn't a standard one).
> I haven't been using Java on Cygwin, but I follow it fairly closely on
> Red Hat Enterprise and Fedora mailing lists. The emerging "standard" way
> of doing things there is with the JPackage.org layout, which heavily
> uses the alternatives system to set up useful JAVA_HOME variables and
> /usr/bin/java{,c} and if desired to easily switch between several JVMs
> (Sun, IBM, even GJC or Kaffe). There are some helper scripts in a
> jpackage-utils package; the original from JPackage.org uses RPMs, but
> Debian and Ubuntu have adopted the overall framework with DEBs so my
> guess would be that making Cygwin packages with the same methods would
> work too.

The problem with using this method on Cygwin is that the executables (or
symlinks) in /usr/bin won't understand Cygwin paths, etc.

> They have a lot of Java apps packaged in a FHS-compliant way, including
> Eclipse and Tomcat (and the config file if you want to change for
> example JAVA_OPTS for Tomcat5 is /etc/tomcat5/tomcat5.conf ). From what
> I remember of Igor's scripts, they basically act like this java-compat
> RPM: http://jpackage.org/rpm.php?id=3319 which creates symlinks to a
> preexisting JVM install. (BTW: they know their website is ugly.) See
> also the Ubuntu package:
> http://packages.ubuntulinux.org/dapper/utils/jpackage-utils
> Or, maybe that's all too complicated. :)

My wrapper scripts do a bit more than that -- they also translate the
arguments containing paths appropriately, before eventually invoking the
right executables.  The part that dispatches based on JAVA_HOME is not the
main point of the scripts, though it's nice to have.
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

More information about the Cygwin-apps mailing list