Java - 罗马 rss 阅读器?
我正在尝试阅读 rss。 我将 jar 文件复制到我的 libs 文件夹中,并将该 jar 文件作为库添加到我的 eclipse 项目中。 为了导出并导出,我检查了我的 jar 文件。
现在我尝试使用罗马提供的 rss 阅读器
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;
URL url = new URL("http://myUrlGoesHere");
XmlReader reader = new XmlReader(url);
SyndFeed feed = new SyndFeedInput().build(reader);
我在最后一行收到以下错误: 无法解析 org.jdom.Document 类型。它是从所需的.class文件间接引用的
这是什么意思?解决办法是什么? * 导入没有错误 *
I am trying to read rss.
I copied the jar file in to my libs folder, and I added the jar file to my eclipse project as a library.
In order and export i checked my jar file.
Now I am trying to use the rss reader provided by rome
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;
URL url = new URL("http://myUrlGoesHere");
XmlReader reader = new XmlReader(url);
SyndFeed feed = new SyndFeedInput().build(reader);
I get the following error on the last line:
The type org.jdom.Document cannot be resolved. It is indirectly referenced from required .class file
What does this mean? What is the solution? * no error on imports *
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了编译它,我必须使用 http://www.jdom-1.1.3.jar 文件。 jdom.org/dist/binary/archive/。 zip 文件解压后,可以在目录 jdom-1.1.3\jdom\build 中找到它。
您需要右键单击您的项目|选择属性 | Java 构建路径 |图书馆 |添加外部 JAR。
In order to get it to compile I had to use the jdom-1.1.3.jar file from http://www.jdom.org/dist/binary/archive/. After the zip file is extracted it can be found in the directory jdom-1.1.3\jdom\build.
You will need to right click on your project| Select Properties | Java Build Path | Libraries | Add External JARs.
除了将 Rome 的 jar 文件复制到您的 libs 文件夹之外,您还需要将 JDOM 的 库 (jar) 添加到您的类路径中。
您收到的错误表明有人间接引用了 JDOM 的 jar。可能是罗马或您无法控制的任何其他图书馆的某个人。
In addition to copying Rome's jar file to your libs folder, you also need to add JDOM's library (jar) to your class path.
The error you are getting says that someone is indirectly referencing JDOM's jar. Probably someone on Rome or any other library you don't control.