gpt4 book ai didi

java - DocumentBuilderFactory 在 JDK 1.8.0_121 中没有 setFeature?

转载 作者:数据小太阳 更新时间:2023-10-29 03:00:29 26 4
gpt4 key购买 nike

在解析 XML 文件时,我的文档生成器正在寻找 DTD,有时它会引发错误(服务器崩溃)。所以当我用谷歌搜索时,我从这里得到了以下解决方案 Ignoring the DTD while parsing XML (我使用的解决方案是 VOTE---90)。 Letter 在我的 IDE 中显示如下错误。

方法 setFeature(String, boolean) 未定义类型 DocumentBuilderFactory

Then I thought its the problem with my maven version then I found the following link.

What is the jar file I should download and from where?

它说它内置在 JDK 中,因此 IDE 本身会建议我导入。

我的JDK版本是

java version "1.8.0_121" Java(TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Maven reference for DocumentBuilder

jar文件中类中的代码 Looks like the class doesn't have the method

最佳答案

以下问题的答案为我解决了这个问题。

Node.getTextContent() is undefined in Node

基本上,您需要将 JRE 库移动到 eclipse 中依赖项的顶部。

关于java - DocumentBuilderFactory 在 JDK 1.8.0_121 中没有 setFeature?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44622975/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com