Java - Rome rss reader?
Asked Answered
A

2

5

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 *

Aspire answered 12/3, 2011 at 22:3 Comment(0)
W
7

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.

Wotan answered 12/3, 2011 at 22:17 Comment(2)
Please tell me where i can find JDOMAspire
@aryaxt: it's there, on the link I posted.Wotan
F
8

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.

Fecal answered 28/4, 2012 at 1:8 Comment(1)
Yep, had to compile my own jdom-1.1.3. Version 2.0.2 didn't seem to work.Esculent
W
7

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.

Wotan answered 12/3, 2011 at 22:17 Comment(2)
Please tell me where i can find JDOMAspire
@aryaxt: it's there, on the link I posted.Wotan

© 2022 - 2024 — McMap. All rights reserved.