如何使用 ROME 进行 RSS
我正在使用罗马教程页面 http://wiki.java.net/ 中的代码twiki/bin/view/Javawsxml/Rome05TutorialFeedReader 。
当我尝试编译时,它说class FeedReader is public,应该在名为 FeedReader.java 的文件中声明
。
我是 Java 新手,但我认为 FeedReader
类应该是示例中使用的包的一部分,或者是导入路径之一。我在下载的罗马库中找不到文件 com.sun.synmination.samples
(这是示例中的包)。有什么想法吗?
I am using the code from Rome's tutorials page http://wiki.java.net/twiki/bin/view/Javawsxml/Rome05TutorialFeedReader .
When I try to compile, it says class FeedReader is public, should be declared in a file named FeedReader.java
.
I am new to Java, but I think that the FeedReader
class should be part of the package used in the example, or in one of the import paths. I can't find file com.sun.syndication.samples
(which is the package from the example) in the Rome library I downloaded. Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
教程中的代码是
它必须位于名为
FeedReader.java
的文件中,并放入目录com/sun/synmination/samples
中。如果更改类的名称,则还必须更改 java 文件的名称。如果更改包声明,则还必须更改文件的位置。The code from your tutorial is
It must be in a file named
FeedReader.java
and put in a directorycom/sun/syndication/samples
. If you change the name of the class, you must change also the name of the java file. If you change the package declaration, you must also change the location of the file.