Fact 1: melting means changing from a solid into a liquid by adding heat energy. 
Fact 2: Heat is Energy and is measured in Joules.
Melting something is changing phases with heat and is measured in joules.