Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Nov 2000 19:11:32 +0000
From:      Patrick Gardella <patrick@freebsd.org>
To:        andrea@webcom.it
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Using specific JDK from ports
Message-ID:  <3A006AE4.9CE47FF2@freebsd.org>
References:  <20001101181752.42552.qmail@webcom.it>

next in thread | previous in thread | raw e-mail | index | archive | help
andrea@webcom.it wrote:
> 
> Hi!
> 
> I recently submitted a PR for a new port (Enhydra 3.1 beta application server),
> and am about to do some more work in this area. Enhydra requires (well, almost)
> a JDK v. 1.2; lot of other stuff also requires specific JDK's. At this moment
> we have different JDK versions in the ports (and I gather IBM 1.3 support is
> upcoming), with options wrt to JIT, compilers, etc. all installing in
> different places.

Yes, but they are all in specific locations:
/usr/local/jdk1.1.8
/usr/local/jdk1.2.2
/usr/local/linux-jdk1.2.2

> This would make it very hard to require a particular version in a port. I had a
> look at javawmwrapper, but it doesn't look very useful, that is, feature
> complete.

I disagree.  Pick *one* (I'd suggest our native 1.2.2), and then use it
in the port, as a RUN_DEPENDS, and have it look for the java executable
in a specific location.  Don't give the user too many options.

Take a look at the Makefile in the tya ports for an idea on this.
 
> What I'd like to see is some kind of software, like apxs for Apache or
> glib12-config, which could be called upon in a port's Makefile to determine
> (at least):
> 
>  - whether there is at least one JDK of required version installed
>  - the path to the compiler
>  - the path to jre
>  - maybe even options to pass
> 
> Note that probably most of this stuff could be solved by appropriate symlinks
> (for my setup, /usr/local/jdk1.2 -> /usr/local/linux-jdk1.2.2 would suffice),
> but I would be uncomfortable with updating such symlinks at port installation.
> Instead, each port which installs a new compiler / jre could just update some
> sort of repository (a file in /etc/jdk, for instance) to let the wrapper know
> it is there. It would still be the user responsibility to determine which one
> to use in case there are multiple equivalent.
> 
> Please comment. If people are interested, I would probably get down and define
> requirements to send for comments again, and then I should also have time to
> actually implement this.

I like this idea.  A similar idea is the Oracle oraenv command where you
tell it what SID you are going use, and then it configures the
environmental variables (In the java case, JAVA_COMPILER, JAVA_HOME,
etc)  It would take setting up a file somewhere that would list the
items for each of the possible configuations.  

Do you need to define what compiler you will be using in an Enhydra
config file?  Otherwise, you can have the user set that up in the
startup script for Enhydra.  The more options you present, the more
opportunities for mistakes.  Like when I tried to use a jit compiled for
1.1.8 in 1.2.2 (it doesn't work).

Patrick


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A006AE4.9CE47FF2>