def java_version ( ) : result = subprocess . check_output ( [ c . JAVA , '-version' ] , stderr = subprocess . STDOUT ) first_line = result . splitlines ( ) [ 0 ] return first_line . decode ( )
how similar is java to python
Call java and return version information .
def java_version():
    """Call java and return version information.

    :return unicode: Java version string
    """
    result = subprocess.check_output(
        [c.JAVA, '-version'], stderr=subprocess.STDOUT
    )
    first_line = result.splitlines()[0]
    return first_line.decode()