Let $V$ be an analytic variety in a domain $Omega subset Cn$ and let $K relcomp V$ be a closed subset. By studying Jensen measures for certain classes of plurisubharmonic functions on $V$, we prove that the relative extremal function $omega_K$ is continuous on $V$ if $Omega$ is hyperconvex and $K$ is regular.