2

i'm using Netbeans IDe 7.0.1. I'm testing a program in Java which is using ROME in order to parse the xml.

 public class RSSNew {
        public static void main(String[] args) throws Exception {
           URL url = new URL("RSS URL");
           XmlReader reader = null;
           try {
                reader = new XmlReader(url);
                SyndFeed feed = new SyndFeedInput().build(reader); /* HERE */
               }
               finally {
                   if (reader != null)
                       reader.close();
                      }
               }
            }

The error is:

**cannot access org.jdom.Document
class file for org.jdom.Document not found
            SyndFeed feed = new SyndFeedInput().build(reader);
Note: C:\Users\User PC\Documents\NetBeansProjects\RSS\src\rss\RSS.java uses unchecked     or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error**

Have you eperienced an error like this?

Thanks, in advance

ps. i have added the following jar files in my project which are:

feed4j.jar rome-1.0.jar rome-1.0-javadoc.jar

programmer
  • 4,571
  • 13
  • 49
  • 59

1 Answers1

4

I just had the same error message - you need to add jdom.jar to your project classpath as well, it's used by rome. You can get it from here: http://www.jdom.org/dist/binary/

Andrei Socaciu
  • 1,198
  • 9
  • 20