From 240e886b9afdf076e38c03de91db9dfee2d8cb73 Mon Sep 17 00:00:00 2001 From: Atomic-Bean <75401809+Atomic-Bean@users.noreply.github.com> Date: Wed, 16 Dec 2020 17:08:47 +1030 Subject: [PATCH] Added information for finding the default java.library.path and warning for overriding it. --- Provide-native-lib-for-libsignal.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Provide-native-lib-for-libsignal.md b/Provide-native-lib-for-libsignal.md index e39df03..6562c58 100644 --- a/Provide-native-lib-for-libsignal.md +++ b/Provide-native-lib-for-libsignal.md @@ -6,11 +6,15 @@ The linux x86_64 version is bundled by default. For other systems, you need to r Then either download the pre-built lib file or compile (`make libzkgroup`) the latest [libzkgroup](https://github.com/signalapp/zkgroup/releases) for your system and put it in the library path. +### Finding the default `java.library.path` + +This [Java program](https://stackoverflow.com/a/20498049) can output any system property, including `java.library.path`. Note that there may be multiple paths to choose from, they are separated with a colon. + ### Overriding `java.library.path` -If you are using `java.library.path` and you can't find you paths or simply wish to not use the system defaults, then you can override the paths by modifying the final line of `build/install/signal-cli/bin/signal-cli` +If your `java.library.path` doesn't have any usable paths or you wish to not use the system defaults, then you can override the paths by modifying the final line of `build/install/signal-cli/bin/signal-cli` ```bash JAVA_LIBRARY_PATH="-Djava.library.path=/your/java/library/path" exec "$JAVACMD" "$JAVA_LIBRARY_PATH" "$@" ``` -Make sure to place your `.dylib`/`.so`/`.dll` file in that folder \ No newline at end of file +Make sure to place your `.dylib`/`.so`/`.dll` file in that folder. Be aware that this method isn't ideal since if you rebuild signal-cli, then the script may be regenerated and you'll need to set this again. \ No newline at end of file