Added information for finding the default java.library.path and warning for overriding it.

Atomic-Bean 2020-12-16 17:08:47 +10:30
parent 37aab20e77
commit 240e886b9a

@ -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
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.