Skip to content

Commit b8c54a6

Browse files
committed
fix: Add platform-specific JVM library detection for Windows ARM64
The JVM startup code was only looking for libjvm.so (Linux), causing 'Unable to determine JVM Type' errors on Windows ARM64. Changes: - Import platform module for OS detection - Add platform-specific JVM library paths: - Windows: bin/server/jvm.dll - macOS: lib/server/libjvm.dylib - Linux: lib/server/libjvm.so This fixes the 42 test failures on windows/arm64 platform.
1 parent 4079025 commit b8c54a6

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

  • bindings/python/src/arcadedb_embedded

bindings/python/src/arcadedb_embedded/jvm.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import glob
88
import os
9+
import platform
910
from pathlib import Path
1011

1112
import jpype
@@ -65,12 +66,23 @@ def start_jvm():
6566
jvm_path = None
6667

6768
if bundled_jre:
68-
# Use bundled JRE - need to find libjvm.so
69+
# Use bundled JRE - need to find JVM library (platform-specific)
6970
jre_dir = Path(bundled_jre).parent.parent # Go from bin/java to jre root
70-
# Look for libjvm.so in lib/server directory (standard location)
71-
libjvm_path = jre_dir / "lib" / "server" / "libjvm.so"
72-
if libjvm_path.exists():
73-
jvm_path = str(libjvm_path)
71+
72+
# Platform-specific JVM library paths
73+
system = platform.system()
74+
if system == "Windows":
75+
# Windows: bin/server/jvm.dll
76+
jvm_lib_path = jre_dir / "bin" / "server" / "jvm.dll"
77+
elif system == "Darwin":
78+
# macOS: lib/server/libjvm.dylib
79+
jvm_lib_path = jre_dir / "lib" / "server" / "libjvm.dylib"
80+
else:
81+
# Linux: lib/server/libjvm.so
82+
jvm_lib_path = jre_dir / "lib" / "server" / "libjvm.so"
83+
84+
if jvm_lib_path.exists():
85+
jvm_path = str(jvm_lib_path)
7486

7587
# Allow customization via environment variables
7688
max_heap = os.environ.get("ARCADEDB_JVM_MAX_HEAP", "4g")

0 commit comments

Comments
 (0)