The thermodynamics of a black-body photon gas may be derived using quantum statistical mechanical arguments, with the radiation field being in equilibrium with the atoms in the wall. The derivation yields the spectral energy density u, which is the energy of the radiation field per unit volume per unit frequency interval, given by: