diff options
author | professorkaos64 | 2016-12-26 14:04:16 -0500 |
---|---|---|
committer | professorkaos64 | 2016-12-26 14:04:16 -0500 |
commit | c80eff15ccf0e902079ffbe2c5cac204fce3f11a (patch) | |
tree | aaadbd5d29ba677b2702e061d793fecd011132b8 /PlayOnLinux.sh | |
parent | e564c98426e73c3663edbb3015726713ac840a07 (diff) | |
download | aur-c80eff15ccf0e902079ffbe2c5cac204fce3f11a.tar.gz |
fix build with launcher, build() section
Diffstat (limited to 'PlayOnLinux.sh')
-rwxr-xr-x | PlayOnLinux.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/PlayOnLinux.sh b/PlayOnLinux.sh index 0ae1b310c9dd..719c33efc08a 100755 --- a/PlayOnLinux.sh +++ b/PlayOnLinux.sh @@ -3,13 +3,10 @@ POL_HOME=/opt/playonlinux5 CLASSPATH=${CLASSPATH}:$POL_HOME/lib/* -# Ensure we are using the right java env -# Don't necessarily force default Java 8, as it is not the default for Arch Linux right now -# This handles users with Java 7 and 8 -export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH +if [[ $(archlinux-java get | cut -d "-" -f2) -ge 8 ]]; then + export JAVA_HOME=$(archlinux-java get) +else + export JAVA_HOME=$(ls /usr/lib/jvm/java-{8,9}-*/bin/javac 2>/dev/null | cut -d "/" -f-5 | head -1) +fi -java -classpath "$CLASSPATH" com.playonlinux.app.PlayOnLinuxApp "$@" - -# Unset vars? -# Note: Java version can be sourced with this one liner: -# IFS=\" read -r _ version _ < <(java -version 2>&1); printf %s\\n "$version +java -classpath "$CLASSPATH" com.playonlinux.javafx.JavaFXApplication "$@" |