def java_version():
    """Show Java version

    Returns:
        str: Result of ``java -version``
    """
    import subprocess
    try:
        res = subprocess.check_output(['java', '-version'], stderr=
            subprocess.STDOUT)
        res = res.decode()
    except FileNotFoundError:
        res = (
            '`java -version` faild. `java` command is not found from this Pythonprocess. Please ensure Java is installed and PATH is set for `java`'
            )
    return res
