  We prove that if a pair of K\"ahler classes is $J$-nef, the $J$-flow on a
compact K\"ahler surface converges to a weak solution of the Monge-Amp\`ere
equation in the sense of currents. We also establish the same convergence
behavior for the deformed Hermitian-Yang-Mills flow. The method is based on a
property of a limit of viscosity subsolutions.
