Electromagnetic interference can cause severe performance degradation on wireless communication systems. In modern military platforms there are many closely located electronic systems, which could potentially cause interference. The performance degradation is largely affected by the characteristics of the interference. With knowledge of the actual interference environment, radio receivers can be adapted to interference characteristics, and thereby providing greatly improved performance. In this work we propose a method for online classification of the interference while receiving an unknown communication signal. Thus, there is no need to interrupt the communication for sensing the environment. The proposed method is evaluated with Monte Carlo simulations, and shown to perform well. Simulations show that the proposed online classification method perform close to the offline optimal classifier at low and high SNR, and just slightly worse at medium SNR (close to 0 dB). The proposed classification method can be used in many applications, such as adaptive demodulation and error correction, dynamic frequency selection and power allocation, and detection and identification of different kinds of interference sources or jamming equipment.