This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Apache Tomcat / Tomcat based apps
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.
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. :)