non déclarée exception java.lang.ClassNotFoundException; doivent être pris ou déclarée à être jetés

J'ai le code simple suivant:

package test;

import javax.swing.*;

class KeyEventDemo {
    static void main(String[] args) {
    UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } 
}

Il génère le message d'erreur suivant:

KeyEventDemo.java:7: unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown
    UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
                            ^
1 error

Quelqu'un sait quel est le problème?

InformationsquelleAutor Roman | 2010-01-30