Hi guys,
I'm trying to get ROME: http://wiki.java.net/bin/view/Javawsxml/Rome working to read an RSS feed but am unsure as to how to import custom packages. The packages you have to download are on that page, but how do i specify them when i come to compile them?
At the moment I have this code:
I get errors on these import statements when doing:
This is when the com folder is in the same location as FeedReader.java.
How do i get it to succesfully import?
I'm trying to get ROME: http://wiki.java.net/bin/view/Javawsxml/Rome working to read an RSS feed but am unsure as to how to import custom packages. The packages you have to download are on that page, but how do i specify them when i come to compile them?
At the moment I have this code:
Code:
package com.sun.syndication.samples;
import java.net.URL;
import java.io.InputStreamReader;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;
/**
* It Reads and prints any RSS/Atom feed type.
* <p>
* @author Alejandro Abdelnur
*
*/
public class FeedReader {
public static void main(String[] args) {
boolean ok = false;
if (args.length==1) {
try {
URL feedUrl = new URL(args[0]);
SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new XmlReader(feedUrl));
System.out.println(feed);
ok = true;
}
catch (Exception ex) {
ex.printStackTrace();
System.out.println("ERROR: "+ex.getMessage());
}
}
if (!ok) {
System.out.println();
System.out.println("FeedReader reads and prints any RSS/Atom feed type.");
System.out.println("The first parameter must be the URL of the feed to read.");
System.out.println();
}
}
}
I get errors on these import statements when doing:
Code:
javac FeedReader.java &
This is when the com folder is in the same location as FeedReader.java.
How do i get it to succesfully import?