Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2306 - /usr/bin/ant - retrieving JAVA_HOME environment
Summary: /usr/bin/ant - retrieving JAVA_HOME environment
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Karl Trygve Kalleberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-01 07:41 UTC by Florian L. Klein
Modified: 2002-05-03 14:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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