Bug#404728: groovy: JAVA_HOME should be set according to /usr/bin/java

Varun Hiremath varunhiremath at gmail.com
Tue Dec 18 09:08:45 UTC 2007


Hi Christian,

On Wed, 27 Dec, 2006 at 10:30:14PM +0100, Christian Hammers wrote:
> Package: groovy
> Version: 0.1.0beta10-3
> Severity: wishlist
> 
> Hello
> When starting groovy for the first time it does not seem to be able to
> detect my Java environment although I've set that up correctly using
> Debian packages. 
> As a user already chooses between his default java environments using
> update-alternative that decision should be enough for groovy, too,
> unless JAVA_HOME has been manuall overridden, of course.
> 
> A possible way to detect the java environment would therefore be the
> following patch (here only for groovy, should be done for groovyc etc, too):
> 
> --- /usr/bin/groovy     2005-10-18 12:39:04.000000000 +0200
> +++ /tmp/groovy 2006-12-27 22:28:24.000000000 +0100
> @@ -59,6 +59,11 @@
>                 [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] &&
>                         export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
>  
> +       else
> +         tmp_java_name="$(readlink -f `which java`)"
> +         case $tmp_java_name in
> +           /usr/lib/jvm/*/bin/java) export JAVA_HOME=${tmp_java_name//\/bin\/java/};;
> +         esac
>         fi
>  
>  fi
> 

We have recently updated groovy to the latest upstream version 1.5,
and I think the JAVA_HOME is set properly in the new version. Could
you please check if the new version of groovy loads properly and let
us know if this bug could be closed?

Regards
Varun

-- 
Varun Hiremath
Undergraduate Student,
Aerospace Engineering Department,
Indian Institute of Technology Madras,
Chennai, India
-------------------------------------
Homepage : http://varun.travisbsd.org





More information about the pkg-java-maintainers mailing list