Closed manosbatsis closed 2 years ago
You can turn off the extraction, but the problem is that then the libraries won't be automatically signed, and of course your app will spam the user's home directory in places that won't get cleaned up on uninstall. You can try setting app.jvm.extract-native-libraries = false
but it's a global setting, you can't set it just for specific JARs.
It might be easier to just quickly fork Realm and fix the JNI code so that instead of detecting Android it tries loadLibrary first and does the extraction in an exception handler. That's a more normal way to do it. You could then submit the fix as a PR?
Realm devs have responded on the above issue but i'm not sure on the best approach to suggest in a reply. They do check an FS location before trying extraction from JAR. Perhaps a system/env property could be used by realm or something, would really appreciate it if you could have a quick look at their reply.
Thank you Mike, closing this one.
The documentation states that native shared/JNI libraries are moved out of the JAR. This seems to create an issue for us with MongoDB's Realm Database, as it's JNI bits only use
System.loadLibrary
for Android and not our desktop JVM app. Naturally we get an exception the one bellow. I'll add a issue to Realm's github, but was wondering if there is a workaround this one from our/conveyor's side in the mean time?