Skip to content

Commit

Permalink
Run path modification for local RDFRules only on MacOS (Darwin)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdouda committed Jan 5, 2025
1 parent 86c391e commit 43a7591
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/pyrdfrules/engine/util/jvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
import jdk
from multiprocessing import Process, Pipe

import jpype
import jpype.imports
from jpype.types import *
import os
import sys
from io import StringIO

import requests
import platform

from pyrdfrules.common.logging.logger import log
from pyrdfrules.engine.exception.failed_to_start_exception import FailedToStartException
Expand Down Expand Up @@ -73,8 +70,9 @@ def is_rdfrules_installed() -> bool:
def set_jvm_env() -> None:
java_home = "%s/%s" % (jdk._JRE_DIR, os.listdir(jdk._JRE_DIR)[0])

# todo - why is this necessary? probably not gonna be needed on Linux and Windows...
java_home += "/Contents/Home"
if platform.system() == "Darwin":
# todo - why is this necessary? probably not gonna be needed on Linux and Windows...
java_home += "/Contents/Home"

os.environ["JAVA_HOME"] = java_home
os.environ["PATH"] = "%s/bin:%s" % (java_home, os.environ["PATH"])
Expand Down

0 comments on commit 43a7591

Please sign in to comment.