First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 61665
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Java team <java@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ian Schneider <ian@frii.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 61665 depends on: Show dependency tree
Bug 61665 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-08-25 11:28 0000
some packages, most notably, dev-java/ant, provide their own shell script
launcher which uses java-config to obtain JAVA_HOME. This is annoying as I
cannot simply specify "JAVA_HOME=<path> ant", but instead must use java-config
or as I have done, hack the ant launcher to respect the environment and not set
JAVA_HOME if its already set.

This would be a nice bit of common functionality to extract to a java the
java-utils eclass.

My hack follows (this is from /usr/bin/ant from dev-java/ant)
BEFORE:
if [ -f $HOME/.gentoo/java-env ] ; then
  source $HOME/.gentoo/java-env
else
  JAVA_HOME=`java-config --jdk-home`
  CLASSPATH=`java-config --classpath`:${CLASSPATH}
fi

if [ -z $JAVA_HOME ] ; then
  echo "Error: No JDK found!"
  echo "Try using java-config script to set your JDK"
  echo "Remember that you need a JDK not a JRE"
  exit 1
fi

FIX:
wrap the above with a conditional "if [ -z $JAVA_HOME ]; then"
and respect a previously declared JAVA_HOME

Thanks

------- Comment #1 From Thomas Matthijs (RETIRED) 2004-09-16 17:09:00 0000 -------
*** Bug 64282 has been marked as a duplicate of this bug. ***

------- Comment #2 From Josh Nichols (RETIRED) 2005-12-10 22:42:23 0000 -------
This seems to have been fixed already. Now, JAVA_HOME will only be defined if 
it hasn't already been so. 

First Last Prev Next    No search results available      Search page      Enter new bug