报无法加载主类的错误,求解
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.output.XMLOutputter;
public class JDOMXMLWriteDemo {
public static void main(String[] args) {
Element rss = new Element("rss");
rss.setAttribute("version", "2.0");
Document document = new Document(rss);
Element channel = new Element("channel");
channel.setText("<大家好>");
rss.addContent(channel);
XMLOutputter outputer = new XMLOutputter();
try {
outputer.output(document, new FileOutputStream(new File("news.xml")));
} catch (FileNotFoundException e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
} catch (IOException e) {
// TODO 自动生成的 catch 块
e.printStackTrace();
}
}
}