// TODO: Read JAR path from somewhere
current_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
classpath = os.path.join(current_dir, "java", "build", "libs", "model-all.jar")
logger.debug(f"Starting JVM with classpath {classpath}")
// NOTE: convertStrings must be set to True to avoid an explosion of
// interop calls when working with the returned Java strings
After Change
More details can be found here:
https://jpype.readthedocs.io/en/latest/userguide.html//multiprocessing
model_jar_path = os.getenv("JAVA_JAR_PATH")
logger.debug(f"Starting JVM with jar: {model_jar_path}")
// NOTE: convertStrings must be set to True to avoid an explosion of
// interop calls when working with the returned Java strings