Loading pythermogis/thermogis_classes/jvm_start.py +3 −4 Original line number Diff line number Diff line Loading @@ -9,12 +9,14 @@ def get_jvm_path() -> str: """ return str(files("pythermogis") / "resources" / "java" / "coretto-17" / "bin" / "server" / "jvm.dll") def get_thermogis_jar_path() -> str: """ From the resources directory, return the path to the ThermoGIS Jar """ return str(files("pythermogis") / "resources" / "thermogis_jar" / "thermogis-1.7.0-shaded_newprops.jar") def start_jvm(): """ To use the JPype package a java .jar file has to be instantiated with a java virtual machine (jvm) Loading @@ -24,6 +26,7 @@ def start_jvm(): if not jpype.isJVMStarted(): jpype.startJVM(get_jvm_path(), classpath=[get_thermogis_jar_path()]) def close_jvm(): """ To use the JPype package a java .jar file has to be instantiated with a java virtual machine (jvm) Loading @@ -32,7 +35,3 @@ def close_jvm(): """ if jpype.isJVMStarted(): jpype.shutdownJVM() if __name__ == "__main__": start_jvm() No newline at end of file Loading
pythermogis/thermogis_classes/jvm_start.py +3 −4 Original line number Diff line number Diff line Loading @@ -9,12 +9,14 @@ def get_jvm_path() -> str: """ return str(files("pythermogis") / "resources" / "java" / "coretto-17" / "bin" / "server" / "jvm.dll") def get_thermogis_jar_path() -> str: """ From the resources directory, return the path to the ThermoGIS Jar """ return str(files("pythermogis") / "resources" / "thermogis_jar" / "thermogis-1.7.0-shaded_newprops.jar") def start_jvm(): """ To use the JPype package a java .jar file has to be instantiated with a java virtual machine (jvm) Loading @@ -24,6 +26,7 @@ def start_jvm(): if not jpype.isJVMStarted(): jpype.startJVM(get_jvm_path(), classpath=[get_thermogis_jar_path()]) def close_jvm(): """ To use the JPype package a java .jar file has to be instantiated with a java virtual machine (jvm) Loading @@ -32,7 +35,3 @@ def close_jvm(): """ if jpype.isJVMStarted(): jpype.shutdownJVM() if __name__ == "__main__": start_jvm() No newline at end of file