Skip to content

Commit 7e59700

Browse files
authored
Merge pull request #1144 from sappo/master
Problem: NativeLoader fails on android 6
2 parents 304461e + d169530 commit 7e59700

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

zproject_java.gsl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -766,11 +766,14 @@ implements AutoCloseable\
766766
. endif
767767
{
768768
static {
769-
try {
770-
NativeLoader.loadLibrary("$(project.prefix:c)jni");
771-
}
772-
catch (Exception e) {
773-
System.exit (-1);
769+
if (System.getProperty("java.vm.vendor").contains("Android")) {
770+
System.loadLibrary("$(project.prefix:c)jni");
771+
} else {
772+
try {
773+
NativeLoader.loadLibrary("$(project.prefix:c)jni");
774+
} catch (Exception e) {
775+
System.exit (-1);
776+
}
774777
}
775778
}
776779
public long self;

0 commit comments

Comments
 (0)