Java 我应该从哪里下载 jar 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18173731/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the jar file I should download and from where?
提问by user2019510
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import java.io.File;
I woud like to work with the above. so,what is jar file I should download and from where??
我想与上述工作。那么,我应该从哪里下载 jar 文件?
采纳答案by Mena
javax.xml
, org.w3c
and java.io
packages resides in the classes.jar
file in your JDK.
javax.xml
,org.w3c
并且java.io
包驻留在classes.jar
JDK中的文件中。
You shouldn't reference any external .jar
file as this should be automatically referenced by your editor.
您不应该引用任何外部.jar
文件,因为您的编辑器应该会自动引用它。
回答by Michael Kay
Although there is an implementation of the DOM provided with the JDK,
尽管 JDK 提供了 DOM 的实现,
the Xerces implementation available from Apache is better (fewer bugs)
there are much better XML tree APIs available: DOM is the first and the worst, though sadly still the most popular. JDOM2 and XOM are faster and easier to use.
Apache 提供的 Xerces 实现更好(错误更少)
有更好的 XML 树 API 可用:DOM 是第一个也是最差的,但遗憾的是仍然是最受欢迎的。JDOM2 和 XOM 更快、更易于使用。