MCPcopy Create free account
hub / github.com/alibaba/GraphScope / get_java_version

Function get_java_version

python/graphscope/framework/utils.py:215–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213
214
215def get_java_version():
216 # Use javac to get the version of java since its output is more stable
217 # in format of "javac 1.8.0_265" or "19.0.2"
218 # so we need to capture both the major and minor version
219 javac = find_java_exe("javac")
220 output = subprocess.run([javac, "-version"], capture_output=True, text=True).stdout
221 match = re.search(r"javac (\d+\.\d+)", output)
222 if match:
223 return match.group(1)
224 else:
225 return None
226
227
228def get_platform_info():

Callers 1

Calls 3

find_java_exeFunction · 0.85
runMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected