File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1313from typing import Optional
1414import zipfile
1515
16- from distutils . spawn import find_executable
16+ from shutil import which
1717from urllib .parse import urljoin
1818from .utils import (
1919 find_existing_language_tool_downloads ,
4242 r'^(?:java|openjdk) [version ]?(?P<major1>\d+)\.(?P<major2>\d+)' ,
4343 re .MULTILINE )
4444
45-
4645def parse_java_version (version_text ):
4746 """Return Java version (major1, major2).
4847
@@ -74,7 +73,7 @@ def parse_java_version(version_text):
7473
7574def confirm_java_compatibility ():
7675 """ Confirms Java major version >= 8. """
77- java_path = find_executable ('java' )
76+ java_path = which ('java' )
7877 if not java_path :
7978 raise ModuleNotFoundError (
8079 'No java install detected. '
You can’t perform that action at this time.
0 commit comments