Skip to content

Commit c417ae8

Browse files
steve-stimfel
authored andcommitted
Honor JAVA_HOME in graalpy.sh
(cherry picked from commit 10dc0d8)
1 parent 58bdd7d commit c417ae8

File tree

1 file changed

+8
-2
lines changed
  • graalpython/lib-graalpython/modules/standalone/app

1 file changed

+8
-2
lines changed

graalpython/lib-graalpython/modules/standalone/app/graalpy.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ while [ -h "$source" ] ; do
1212
done
1313
location="$( cd -P "$( dirname "$source" )" && pwd )"
1414

15+
if [ -z "$JAVA_HOME" ]; then
16+
JAVA=$JAVA_HOME/bin/java
17+
else
18+
JAVA=java
19+
fi
20+
1521
for var in "$@"; do
1622
args="${args}$(printf "\v")${var}"
1723
done
1824

1925
export GRAAL_PYTHON_ARGS=$args
20-
echo graalpy.sh is going to execute: mvn -f "${location}/pom.xml" exec:exec -Dexec.executable=java -Dexec.args="--module-path %classpath '-Dorg.graalvm.launcher.executablename=$0' --module org.graalvm.py.launcher/com.oracle.graal.python.shell.GraalPythonMain"
21-
mvn -f "${location}/pom.xml" exec:exec -Dexec.executable=java -Dexec.args="--module-path %classpath '-Dorg.graalvm.launcher.executablename=$0' --module org.graalvm.py.launcher/com.oracle.graal.python.shell.GraalPythonMain"
26+
echo graalpy.sh is going to execute: mvn -f "${location}/pom.xml" exec:exec -Dexec.executable=$JAVA -Dexec.args="--module-path %classpath '-Dorg.graalvm.launcher.executablename=$0' --module org.graalvm.py.launcher/com.oracle.graal.python.shell.GraalPythonMain"
27+
mvn -f "${location}/pom.xml" exec:exec -Dexec.executable="${JAVA}" -Dexec.args="--module-path %classpath '-Dorg.graalvm.launcher.executablename=$0' --module org.graalvm.py.launcher/com.oracle.graal.python.shell.GraalPythonMain"

0 commit comments

Comments
 (0)