Catch UnsatisfiedLinkError in Java example.

GitOrigin-RevId: d6e3f5cfd21593e1ae2861559ddcac13a1da85c4
This commit is contained in:
levlam 2019-06-10 19:49:34 +03:00
parent 4c781ebb7b
commit 99ce6f882a
2 changed files with 5 additions and 2 deletions

View File

@ -47,7 +47,6 @@ add_custom_target(build_java
DEPENDS td_generate_java_api
)
set(JAVA_SOURCE_PATH "${TD_API_JAVA_PATH}/${TD_API_JAVA_PACKAGE}")
add_custom_target(generate_javadoc
COMMAND ${Java_JAVADOC_EXECUTABLE} -d ${JAVA_OUTPUT_DIRECTORY}/../docs org.drinkless.tdlib
WORKING_DIRECTORY ${TD_API_JAVA_PATH}

View File

@ -54,7 +54,11 @@ public final class Example {
private static volatile String currentPrompt = null;
static {
System.loadLibrary("tdjni");
try {
System.loadLibrary("tdjni");
} catch (UnsatisfiedLinkError e) {
e.printStackTrace();
}
}
private static void print(String str) {