Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 2306

Summary: /usr/bin/ant - retrieving JAVA_HOME environment
Product: Gentoo Linux Reporter: Florian L. Klein <kleinf>
Component: [OLD] DevelopmentAssignee: Karl Trygve Kalleberg (RETIRED) <karltk>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: 1.1a   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Florian L. Klein 2002-05-01 07:41:22 UTC
/usr/bin/ant is a shell script to start the Java build tool ANT. It retrieves
some environment settings from /etc/env.d/20java. My active Java kit is
blackdown-jdk-1.3.1.

Unfortunately the file 20java has several lines containing the string JAVA_HOME,
with the shell script getting all of them instead of only the line setting the
variable. As a result, JAVA_HOME will contain a multiline string which ANT
doesn't like.

Fix: /usr/bin/ant, line 11:

- JAVA_HOME=`grep JAVA_HOME $envfile | sed "s/JAVA_HOME=//"
+ JAVA_HOME=`grep "^JAVA_HOME" $envfile | sed "s/JAVA_HOME=//"`
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-05-03 14:50:54 UTC
Fixed in dev-java/ant-1.4.1-r3