How can I prove the following Liouville theorem without using the mean value property?

>If $u$ is harmonic on $\mathbb{R}^n$ and $\int_{\mathbb{R}^n}|D u|^2 dx \leq C$ for some $C > 0$, then $u$ is constant.


The proof that I know indeed uses the mean value property for harmonic functions.