JXTA 2.7 上缺少方法
我已经开始阅读 Practical JXTA II 中的如何使用 JXTA 来构建我想要制作的应用程序。尽管提供的代码(示例)不适用于 JXTA 2.7 。更具体地说 Z_Tools_And_Others 的工具类无法编译,因为 TheRendezVous 类没有 2.6 中存在的 getConnectedPeers() 和 getConnectedRendezVous() 。因此我无法继续,因为大多数示例中都使用了工具类。熟悉这个的人有什么建议吗?使用 2.6 进行学习然后转向 2.7 是否更好?
谢谢。
I have started reading how to use JXTA from Practical JXTA II for an application i want to make. Although the code provided (examples) doesn't work with JXTA 2.7 . More specifically
Tools class of Z_Tools_And_Others doesn't compile since TheRendezVous class doesn't have getConnectedPeers() and getConnectedRendezVous() which exist in 2.6 . Therefor i cant continue since Tools class is used in most of the examples . Anyone familiar with this got any suggestions ? Is it better to use 2.6 for learning purposes and then move to 2.7 ?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
抱歉回复晚了:Practical JXTA II 的文件可以从此处获取。
我很确定您正在尝试将 2.6 代码与 2.7 一起使用。如果您在使用 jxta II 实际示例时仍然遇到问题,请告诉我。
Sorry for the late reply: the files for Practical JXTA II are available from here.
I am pretty sure you are trying to use 2.6 code with 2.7. Let me know if you still encounter an issue with the practical jxta II examples.
TheList 不起作用。方法 getConnectedRendezVous 在 2.7 中被删除。替换它的是返回一个列表。这会在以后产生更多错误。我应该更改代码以便它适用于列表吗?我想我可以使用 listIterator 来替换 .nextElement() 同一类的 popConnectedPeers(RendezVousService TheRendezVous, String Name) 也存在同样的问题。
还有
包 Examples.K_Service 中的第 166 行;
公共类_710_Astrology_Service_Example实现Service,Runnable
Result.setCompat(StdPeerGroup.STD_COMPAT);
STD_COMPAT 被删除。我用这个替换它:
ModuleImplAdvertisement ad =StdPeerGroup.getDefaultModuleImplAdvertisement();
Result.setCompat(ad.getCompat());
不知道它好不好..代码可以编译:P
TheList isnt working .The method getConnectedRendezVous is removed in 2.7 . The one that is replacing it is returning a List .That creates more errors later . Should i change the code so that it works for a List ?I thought i could use a listIterator to replace .nextElement() Same problem exists with popConnectedPeers(RendezVousService TheRendezVous, String Name) of same class.
Also line 166 in
package Examples.K_Service;
public class _710_Astrology_Service_Example implements Service, Runnable
Result.setCompat(StdPeerGroup.STD_COMPAT);
STD_COMPAT is removed . I replaced it with this :
ModuleImplAdvertisement ad =StdPeerGroup.getDefaultModuleImplAdvertisement();
Result.setCompat(ad.getCompat());
No idea if its good or not..code compiles tho :P