Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 2006 12:24:57 +0200
From:      Jean-Baptiste Quenot <jbq@caraldi.com>
To:        freebsd-java@freebsd.org
Subject:   Re: Getting JAVA_HOME at runtime
Message-ID:  <20060417102456.GA37686@watt.intra.caraldi.com>
In-Reply-To: <20060415004125.GA57315@arabica.esil.univ-mrs.fr>
References:  <20060411180145.GP53974@vision.anyware> <20060411222343.GA55418@arabica.esil.univ-mrs.fr> <20060412180028.GB29790@vision.anyware> <20060415004125.GA57315@arabica.esil.univ-mrs.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
* Herve Quiroz:

> ATM you can't. So far, each time I needed such feature I found a
> workaround or ended up enforcing a JDK in the shell script.

Actually I found a solution by analyzing what javavm is doing:

  make -f /usr/ports/Mk/bsd.port.mk -V JAVA_HOME USE_JAVA=yes

And this will allow the sysadmin to set a version requirement, eg:

  resin2_java_version=1.5+

Will be translated into:

  JAVA_HOME=$(make -f /usr/ports/Mk/bsd.port.mk -V JAVA_HOME USE_JAVA=yes JAVA_VERSION="${resin2_java_version}")

However it slows down a little bit the rc script.
-- 
     Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060417102456.GA37686>