Skip to content

Commit

Permalink
Tools: check for Java 8 on Linux
Browse files Browse the repository at this point in the history
This allows us to print an error message instead of a weird Java failure
further down the road.

Better yet would be if this would take down everything, so a user does
not have to scroll up to read the message.
  • Loading branch information
julianoes authored and dagar committed Jan 31, 2020
1 parent 035c3e6 commit 733e73e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tools/jmavsim_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ if [ "$(uname)" == "Darwin" ]; then
exit 1
fi
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
elif [ "$(uname)" == "Linux" ]; then
if ! java -version 2>&1 | grep --quiet "1.8" ; then
echo "${bold}You need to use Java 8, for more info, see:${normal}"
echo "${bold}https://dev.px4.io/master/en/simulation/jmavsim.html#ubuntu${normal}"
exit 1
fi
fi

ant create_run_jar copy_res
Expand Down

0 comments on commit 733e73e

Please sign in to comment.