From c18ebafba641af3dbf7b32ad407b324fc0db7f61 Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 25 Mar 2020 17:43:06 +0100 Subject: [PATCH] Fixes #481 See the bug description in #481 --- jnius/env.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jnius/env.py b/jnius/env.py index ac40abe..c8618e5 100644 --- a/jnius/env.py +++ b/jnius/env.py @@ -230,8 +230,9 @@ def get_jnius_lib_location(platform): print("warning: unknown platform assuming linux") lib_location = 'jre/lib/{}/server/libjvm.so'.format(cpu) - - jre_home = dirname(get_jre_home(platform)).strip('jre') + + if jre_home.endswith('jre'): + jre_home = dirname(get_jre_home(platform))[:-3] full_lib_location = join(jre_home, lib_location)