Use *_HOME environment variables to determine java executable
-------------------------------------------------------------
Key: ISPN-747
URL:
https://jira.jboss.org/browse/ISPN-747
Project: Infinispan
Issue Type: Feature Request
Reporter: Tobias Sarnowski
Assignee: Manik Surtani
The startServer.sh script currently only invokes "java" directly. The well-known
java environment variables like JAVA_HOME are ignored. This raises problems when having a
default java installation like gnu gcj 1.42 in the system. Since the linux distribution
packages are too old in general, I have e.g. the Oracle JDK unzipped under /opt with
JAVA_HOME pointing to it.
Having JAVA_HOME set in general indicates that this java should be used, so it should be
respected.
The following change would solve this issue:
# diff startServer.sh startServer.sh.new
51c51,59
< java -cp $CP ${JVM_PARAMS} org.infinispan.server.core.Main ${*}
---
JAVA_EXE=java
if [ ! -z "$JAVA_HOME" ]; then
JAVA_EXE=$JAVA_HOME/bin/java
elif [ ! -z "$JDK_HOME" ]; then
JAVA_EXE=$JDK_HOME/bin/java
elif [ ! -z "$JRE_HOME" ]; then
JAVA_EXE=$JRE_HOME/bin/java
fi
$JAVA_EXE -cp $CP ${JVM_PARAMS} org.infinispan.server.core.Main ${*}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira