try catch试试,我把你的程序简略的调试了下,没有问题:
import java.io.File;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
public class Aaa {
public static void main(String[] args) {
File file = new File("E:/home/xmltest/test.xml");
SAXReader reader = new SAXReader();
System.out.println("Dom4jxml2:555::SAXReader");
Document doc = null;
try {
doc = reader.read(file);
} catch (DocumentException e) {
e.printStackTrace();
}
System.out.println("Dom4jxml2:666::");
}
}
看看你的错误信息