Date: Thu, 29 Sep 2005 15:06:34 +0200 From: Herve Quiroz <herve.quiroz@esil.univ-mrs.fr> To: Ashley Moran <work@ashleymoran.me.uk> Cc: freebsd-java@freebsd.org Subject: Re: JBoss ports do not respect the user's JAVA_VERSION Message-ID: <20050929130634.GA24933@arabica.esil.univ-mrs.fr> In-Reply-To: <433BCD85.10808@ashleymoran.me.uk> References: <433BC658.7000808@ebs.gr> <433BCD85.10808@ashleymoran.me.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050929130634.GA24933>