We characterize the spectral compactness of commutative von Neumann regular rings . We show that through a process of adjunction of identity, we can obtain the Alexandroff compactification or a star compactification of the prime spectrum of certain von Neumann regular rings .