I am a python3 beginner. I am trying to get the java version with a python3 script. After I checked the docs, I saw that subprocess.check_output might be what I need.
output = subprocess.check_output(["java", "-version"])
print("Output is {}".format(output))
The problem is the output I am getting is
Output is b''
Why am I not getting the correct string that I get with bash?
Thanks