Skip to content
Snippets Groups Projects
Commit bd47fd99 authored by schmittu's avatar schmittu :beer:
Browse files

fix finding java executable on windows

parent c9afa82a
No related branches found
No related tags found
No related merge requests found
Pipeline #875 failed
......@@ -76,9 +76,10 @@ def get_jre_home(folder=_default_jre_folder()):
@functools.lru_cache()
def find_java_bin(folder=_default_jre_folder()):
home = get_jre_home(folder)
java_executable = "java.exe" if sys.platform == "win32" else "java"
for folder, __, files in os.walk(home):
if "java" in files:
return os.path.join(folder, "java")
if java_executable in files:
return os.path.join(folder, java_executable)
raise RuntimeError(f"can not find java within {home}")
......
......@@ -3,13 +3,11 @@
import tempfile
import subprocess
import emzed.lib
from .exceptions import MzMine2Exception
from .parameters import ParameterBase
from .java_utils import construct_java_call_cli_args, run_java
from .java_utils import run_java
class RemoveShoulderPeaksParameters(ParameterBase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment