您的位置:首页 > Web前端 > Node.js

The method getTextContent() is undefined for the type Node解决方法(eclipse)

2016-12-23 16:20 731 查看
前两天在使用org.w3c.dom.Node.getTextContent()出现了The method getTextContent() is undefined for the type Node的提示,
如下图:



产生的原因:

在j2ee项目中的xml-apis.jar下的org.w3c.dom干扰了Java的类查找,所以我们只需要把jdk的优先级调整到它之前就可以了。

解决方法:

在eclipse中对应项目中右击按照: build path--> configure build path进入path对应界面,如下图:



选择order and export,如下图:



将图中的jre system library选中,并点击top按钮,让jre排在最上面,如下图:



点击ok按钮,就可以了,现在看项目中就没出现错误提示了,如下图:



---------------------------------------------------------------------------版权声明------------------------------------------------------------------------------------------

版权声明:本文为博主原创文章,未经博主允许不得转载。博客地址:http://blog.csdn.net/mr_smile2014
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: