Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 124f875

Browse files
committed
Added call to os.add_dll_directory base on JAVA_HOME value
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent fddc7ce commit 124f875

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/pyhdk/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
if sys.platform == "linux":
1414
prev = sys.getdlopenflags()
1515
sys.setdlopenflags(os.RTLD_LAZY | os.RTLD_GLOBAL)
16+
elif sys.platform == "win32":
17+
if "JAVA_HOME" not in os.environ:
18+
raise RuntimeError(
19+
"HDK engine requires JAVA_HOME environment variable to point to Java runtime location."
20+
)
21+
os.add_dll_directory(os.path.join(os.environ["JAVA_HOME"], "bin", "server"))
1622

1723
from pyhdk._common import TypeInfo, buildConfig, initLogger
1824
from pyhdk._execute import Executor

0 commit comments

Comments
 (0)