diff options
author | Chris Ball <cjb@laptop.org> | 2009-12-24 01:53:41 -0500 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2010-04-05 13:06:23 -0400 |
commit | 6d5f97d67df88ba77cb38f62c08dcba9fe306f87 (patch) | |
tree | 7367504dbb33102f621e45e0963242e8a32aeca2 | |
parent | 04669dd33b624a9827e335dff15d99f703ca49f8 (diff) | |
download | etherpad-6d5f97d67df88ba77cb38f62c08dcba9fe306f87.tar.gz etherpad-6d5f97d67df88ba77cb38f62c08dcba9fe306f87.tar.xz etherpad-6d5f97d67df88ba77cb38f62c08dcba9fe306f87.zip |
Attempt to check for Sun javac, and warn the user if we don't find it.
-rwxr-xr-x | etherpad/bin/rebuildjar.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/etherpad/bin/rebuildjar.sh b/etherpad/bin/rebuildjar.sh index 3238163..a63cc0c 100755 --- a/etherpad/bin/rebuildjar.sh +++ b/etherpad/bin/rebuildjar.sh @@ -53,6 +53,22 @@ function depscheck { exit 1 fi + # Check for javac version. Unfortunately, javac doesn't tell you whether + # it's Sun Java or OpenJDK, but the "java" binary that's in the same + # directory will. + if [ -e "$JAVA_HOME/bin/java" ]; then + ($JAVA_HOME/bin/java -version 2>&1) | { + while read file; do + javaver=$file + done + for word in $javaver; do + if [ $word != "Java" ]; then + echo "$JAVA_HOME/bin/java is from a non-Sun compiler, and may not be able to compile etherpad. If you get syntax errors, you should point \$JAVA_HOME at a Sun Java JDK installation instead." + fi + break + done + } + fi } depscheck |