def METHOD_NAME(os_user):
    if not exists(conn,'/home/' + os_user + '/.ensure_dir/jre_jdk_ensured'):
        try:
            conn.sudo('mkdir -p /home/' + os_user + '/.ensure_dir')
            conn.sudo('apt-get update')
            conn.sudo('apt-get install -y default-jre')
            conn.sudo('apt-get install -y default-jdk')
            conn.sudo('touch /home/' + os_user + '/.ensure_dir/jre_jdk_ensured')
        except:
            sys.exit(1)