From owner-freebsd-java@FreeBSD.ORG Thu Sep 29 13:52:31 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F3A316A41F for ; Thu, 29 Sep 2005 13:52:31 +0000 (GMT) (envelope-from past@ebs.gr) Received: from fly.ebs.gr (fly.ebs.gr [62.103.84.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E12043D4C for ; Thu, 29 Sep 2005 13:52:29 +0000 (GMT) (envelope-from past@ebs.gr) Received: from ebs.gr (root@hal.ebs.gr [10.1.1.2]) by fly.ebs.gr (8.12.9p1/8.12.9) with ESMTP id j8TDqF9V066295; Thu, 29 Sep 2005 16:52:15 +0300 (EEST) (envelope-from past@ebs.gr) Received: from [10.1.1.158] (pc158.ebs.gr [10.1.1.158]) by ebs.gr (8.13.3/8.12.11) with ESMTP id j8TDqPKK094142; Thu, 29 Sep 2005 16:52:26 +0300 (EEST) (envelope-from past@ebs.gr) Message-ID: <433BF187.8020905@ebs.gr> Date: Thu, 29 Sep 2005 16:52:07 +0300 From: Panagiotis Astithas Organization: EBS Ltd. User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050830) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Herve Quiroz References: <433BC658.7000808@ebs.gr> <433BCD85.10808@ashleymoran.me.uk> <20050929130634.GA24933@arabica.esil.univ-mrs.fr> In-Reply-To: <20050929130634.GA24933@arabica.esil.univ-mrs.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ashley Moran , freebsd-java@freebsd.org Subject: Re: JBoss ports do not respect the user's JAVA_VERSION X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2005 13:52:31 -0000 Herve Quiroz wrote: > On Thu, Sep 29, 2005 at 12:18:29PM +0100, Ashley Moran wrote: > >>Panagiotis Astithas wrote: >> >>>Actually grepping through the java category shows that almost all >>>java-dependent ports, behave like that. Shouldn't we make a sweep and >>>fix them all? > > > Actually that's indeed the intended behavior. The port defines a *range* > of JVM versions that are acceptable and one is picked up during > build/install of the port. Hence the "+" in "1.4+" to allow other JDKs > to be picked up. > > Your problem here lies in the fact that you have several JDKs installed > and that they are not sorted the way you would like them to be. Here > again it's the intended behavior. There is an "official" priority list > for JDK ports in bsd.java.mk and java/jdk14 is the default JDK on any > FreeBSD but 4.x. However, users may override this order, using > JAVA_PREFERRED_PORTS (in /etc/make.conf for instance). > > >>I had a similar problem. I had to hack my /usr/ports/Mk/bsd.java.mk >>file to set the preferred JDK to native/1.5 to get tomcat to compile >>against JDK 1.5. I was wondering when this file will be updated to >>support the latest JDK (even if native/1.4 is left as the default). > > > No need to hack your bsd.java.mk, just add this in your /etc/make.conf: > > JAVA_PREFERRED_PORTS= JAVA_PORT_NATIVE_BSDJAVA_JDK_1_5 > > I've been updating lots of Java ports recently to have them use > javavmwrapper 2.0 (which uses the logic from bsd.java.mk) so that no > JAVA_HOME is hardcoded anymore. But you are right the JBoss ports (and > jboss*ctl executables) do hardcode some JAVA_HOME value. Once the > rcNG'ification of www/jakarta-tomcat55 is proven to be fine (through > testing and feedback), I will try to apply the same changes to the JBoss > ports as well. > > OTOH, the main issue here is more about documenting the > JAVA_PREFERRED_PORTS feature. In this extend, I am trying to write down > a "FreeBSD Java Handbook" based on the work in "Java and Jakarta Tomcat > on FreeBSD" article [1]. But my spare time is quite limited at the > moment so it may take quite a long time for me to come up with the final > article. However, I will try to add a small statement in the header of > bsd.java.mk about it ASAP. > > Herve Ah, I see. My initial reaction was to check the man page of javavmwrapper and I didn't see a mention of JAVA_PREFERRED_PORTS in there. If you could add a couple of lines about its use, then we'd be fine I think. I very much appreciate the fact that javavmwrapper and bsd.java.mk are consistent in their selection of jdks. Thanks, Panagiotis