| Summary: | dev-java/ant ignores JAVA_HOME | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Christian Wehrfritz <airfritz> |
| Component: | [OLD] Development | Assignee: | Java team <java> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | minor | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
/usr/bin/ant overrides any JAVA_HOME setting.
Reproducible: Always
Steps to Reproduce:
1. export JAVA=HOME=/opt/WebSphere/AppServer/java
2. export PATH=$JAVA_HOME/bin
3. ant
Actual Results:
ant ignores the above settings
an easy fix would be to test if JAVA_HOME is set, before
overwriting it:
if [ -z $JAVA_HOME ] ; then
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
fi
|
/usr/bin/ant overrides any JAVA_HOME setting. Reproducible: Always Steps to Reproduce: 1. export JAVA=HOME=/opt/WebSphere/AppServer/java 2. export PATH=$JAVA_HOME/bin 3. ant Actual Results: ant ignores the above settings an easy fix would be to test if JAVA_HOME is set, before overwriting it: if [ -z $JAVA_HOME ] ; then if [ -f $HOME/.gentoo/java-env ] ; then source $HOME/.gentoo/java-env else JAVA_HOME=