1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
From: Colin Watson <cjwatson@debian.org>
Date: Wed, 3 Sep 2025 20:41:54 +0100
Subject: Look for system-installed org.jpype.jar
Bug-Debian: https://bugs.debian.org/1017761
Last-Update: 2025-09-03
---
jpype/_core.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/jpype/_core.py b/jpype/_core.py
index 61b44a9..8afe70e 100644
--- a/jpype/_core.py
+++ b/jpype/_core.py
@@ -298,11 +298,18 @@ def startJVM(
# extra_jvm_args += ['--module-path=%s'%mp ]
# Get the support library
- support_lib = os.path.join(os.path.dirname(
- os.path.dirname(__file__)), "org.jpype.jar")
- if not os.path.exists(support_lib):
+ support_lib_paths = [
+ os.path.join(os.path.dirname(
+ os.path.dirname(__file__)), "org.jpype.jar"),
+ "/usr/share/java/org.jpype.jar",
+ ]
+ for support_lib in support_lib_paths:
+ if os.path.exists(support_lib):
+ break
+ else:
raise RuntimeError(
- "Unable to find org.jpype.jar support library at " + support_lib)
+ "Unable to find org.jpype.jar support library in " +
+ str(support_lib_paths))
system_class_loader = _getOption(
jvm_args, "-Djava.system.class.loader", keep=True)
|