diff --git a/example/android/README.md b/example/android/README.md index 7c41a295d..f484d2aa9 100644 --- a/example/android/README.md +++ b/example/android/README.md @@ -1,7 +1,7 @@ # TDLib Android example This is an example of building `TDLib` for Android. -You need a Bash shell on Linux, macOS, or Windows with some common tools, a C++ compiler, cmake, JDK, PHP, and gperf pre-installed. +You need a Bash shell on Linux, macOS, or Windows with some common tools, a C++ compiler, JDK, PHP, perl, and gperf pre-installed. ## Building TDLib for Android diff --git a/example/android/check-environment.sh b/example/android/check-environment.sh index f3bdf960d..1308647b6 100755 --- a/example/android/check-environment.sh +++ b/example/android/check-environment.sh @@ -25,7 +25,7 @@ else exit 1 fi -for TOOL_NAME in gperf jar javadoc make perl php sed tar yes unzip ; do +for TOOL_NAME in gperf jar java javadoc make perl php sed tar yes unzip ; do if ! which "$TOOL_NAME" >/dev/null 2>&1 ; then echo "Error: this script requires $TOOL_NAME tool installed." exit 1 @@ -43,3 +43,8 @@ if ! perl -MExtUtils::MakeMaker -MLocale::Maketext::Simple -MPod::Usage -e '' >/ fi exit 1 fi + +if ! java --help >/dev/null 2>&1 ; then + echo "Error: Java installation is broken. Install JDK from https://www.oracle.com/java/technologies/downloads/." + exit 1 +fi