Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
<p>This is my code</p>

<pre><code>public class InterfaceView extends FrameView {
    public static void addComports()
    {
        //System.out.println(System.getProperty("sun.arch.data.model"));

        comPorts.removeAllItems();
        int count = 0;
      java.util.Enumeration comPortList = CommPortIdentifier.getPortIdentifiers();
        while (comPortList.hasMoreElements())
        {
            CommPortIdentifier cpi = (CommPortIdentifier) comPortList.nextElement();

              if (cpi.getPortType() == CommPortIdentifier.PORT_SERIAL) {
                 comPorts.addItem(cpi.getName());
                 count++;
              }
        }

    }
</code></pre>

<p>when i run it gives me the exception: 
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError in the line </p>

<pre><code>java.util.Enumeration comPortList = CommPortIdentifier.getPortIdentifiers();
</code></pre>

<p>how to remove it ?</p>
