javafx中的RSS阅读器

javafx中的RSS阅读器,rss,javafx-2,Rss,Javafx 2,我正在尝试解析来自javafx项目的rss提要,但遇到以下异常 java.lang.NullPointerException 在com.sun.webpane.webkit.network.CookieJar$PolicyDelegateFilter.shouldAccept(CookieJar.java:42) 位于com.sun.webpane.webkit.network.CookieManager.put(CookieManager.java:193) 位于sun.net.www.htt

我正在尝试解析来自javafx项目的rss提要,但遇到以下异常

java.lang.NullPointerException 在com.sun.webpane.webkit.network.CookieJar$PolicyDelegateFilter.shouldAccept(CookieJar.java:42) 位于com.sun.webpane.webkit.network.CookieManager.put(CookieManager.java:193) 位于sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:710) 位于sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) 位于sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049) 位于java.net.URL.openStream(URL.java:1009) 请访问org.jugc.rss.RSSReader.readNews(RSSReader.java:38) 位于org.jugc.view.RSSViewer(RSSViewer.java:34) 位于org.jugc.view.JugCMain.start(JugCMain.java:67) 位于com.sun.javafx.application.launchempl$3.run(launchempl.java:127) 位于com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:87) 位于com.sun.javafx.application.PlatformImpl$2.run(PlatformImpl.java:65) 在com.sun.glass.ui.win.WinApplication.\u runLoop(本机方法) com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29) 位于com.sun.glass.ui.win.WinApplication$1$1.run(WinApplication.java:49) 运行(Thread.java:619)

DocumentBuilder=DocumentBuilderFactory.newInstance().newDocumentBuilder();
URL u=新的URL(“http://www.jugchennai.in/feed/"); // 您的源url
System.setProperty(“http.proxyHost”、“192.168.32.10”);
setProperty(“http.proxyPort”、“8080”);
documentdoc=builder.parse(u.openStream());
NodeList节点=doc.getElementsByTagName(“项”);
对于(int i=0;i
我在javafx中使用以下代码

RSSReader rSSReader = RSSReader.getInstance();
    ArrayList<RSSFeed> rSSFeeds = (ArrayList) rSSReader.readNews();
    //ArrayList<RSSFeed> rSSFeeds = new ArrayList<RSSFeed>();
    RSSFeed rSSFeed1 = new RSSFeed();
    rSSFeed1.setTitle("August Meetup Scalatra, Scalate Netbeans Training");
    rSSFeed1.setLink("http://www.jugchennai.in/2011/08/13/august-meetup-scalatra-scalate-netbeans-training/");
    rSSFeeds.add(rSSFeed1);
    Hyperlink[] hpls = new Hyperlink[rSSFeeds.size()];
    for (int i = 0; i < rSSFeeds.size(); i++) {
        RSSFeed rSSFeed = rSSFeeds.get(i);
        final Hyperlink hpl = hpls[i] = new Hyperlink(rSSFeed.getTitle());

        final String url = rSSFeed.getLink();

        hpl.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent e) {
                webEngine.load(url);
            }
        });
    }
    toolBar = new VBox();
    toolBar.setVisible(true);
    toolBar.getChildren().addAll(hpls);
    getChildren().add(toolBar);
    getChildren().add(browser);
RSSReader-RSSReader=RSSReader.getInstance();
ArrayList rSSFeeds=(ArrayList)rSSReader.readNews();
//ArrayList rSSFeeds=新的ArrayList();
RSSFeed rSSFeed1=新的RSSFeed();
rSSFeed1.setTitle(“八月Scalatra会议,Scalate Netbeans培训”);
rSSFeed1.setLink(“http://www.jugchennai.in/2011/08/13/august-meetup-scalatra-scalate-netbeans-training/");
rSSFeeds.add(rSSFeed1);
Hyperlink[]hpls=新的超链接[rSSFeeds.size()];
对于(int i=0;i
我看到有一个代理集。您确定这些设置正确吗?是的,从独立应用程序运行RSS解析器时,其工作正常。当我通过javafx应用程序调用它时,它不起作用。
RSSReader rSSReader = RSSReader.getInstance();
    ArrayList<RSSFeed> rSSFeeds = (ArrayList) rSSReader.readNews();
    //ArrayList<RSSFeed> rSSFeeds = new ArrayList<RSSFeed>();
    RSSFeed rSSFeed1 = new RSSFeed();
    rSSFeed1.setTitle("August Meetup Scalatra, Scalate Netbeans Training");
    rSSFeed1.setLink("http://www.jugchennai.in/2011/08/13/august-meetup-scalatra-scalate-netbeans-training/");
    rSSFeeds.add(rSSFeed1);
    Hyperlink[] hpls = new Hyperlink[rSSFeeds.size()];
    for (int i = 0; i < rSSFeeds.size(); i++) {
        RSSFeed rSSFeed = rSSFeeds.get(i);
        final Hyperlink hpl = hpls[i] = new Hyperlink(rSSFeed.getTitle());

        final String url = rSSFeed.getLink();

        hpl.setOnAction(new EventHandler<ActionEvent>() {

            @Override
            public void handle(ActionEvent e) {
                webEngine.load(url);
            }
        });
    }
    toolBar = new VBox();
    toolBar.setVisible(true);
    toolBar.getChildren().addAll(hpls);
    getChildren().add(toolBar);
    getChildren().add(browser);