有没有办法为支持 Java ME 的设备开发新的 JSR?
我有一个 MIDP2.0 移动设备,不支持特定的 JSR(它是 J2ME 的 JSR 180 SIP API)。 Sun 的网站说有一个参考实现,但似乎已经删除了。
问题是,我可以开发 JSR 180 并将其部署到设备上,以便应用程序可以使用它吗?或者它应该在设备固件中(显然我无法轻松访问它)?
感谢您提供答案、链接、指南以及我能得到的任何信息(对于试图记住 Java ME 的菜鸟来说)。
I have a MIDP2.0 mobile device with no support for a specific JSR (it's JSR 180 SIP API for J2ME). Sun's website says there's a reference implementation but it seems it's already removed.
The question is, can I develop JSR 180 and deploy it to the device, so applications can use it? Or should it be in the device firmware (obviously I don't have easy access to it)?
Thank you for answers, links, guides, any information I can get (for a noob trying to remember Java ME).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
JSR 是设备 Java ME 平台的一部分,因此您(作为应用程序开发人员)无法修改它们(包括添加新类)。
然而,没有什么可以阻止您在自己的应用程序中重新实现 JSR 的部分(或全部)功能来解决问题。但是,您将无法复制正确的包名称来使您的代码“完全”符合实际的 JSR。
我自己没有看过 JSR 180,所以我不知道这会需要多少额外工作,但我过去曾对 JSR 172(XML/Web 服务)做过类似的事情,我编写了自己的基本 XML 解析器和 Web服务包装器。
JSRs are part of the device's Java ME platform and therefore you (as an application developer) cannot modify them (including adding new classes).
However, there is nothing stopping you from reimplementing some (or all) of the features of a JSR in your own application, working around the problem. However, you would not be able to duplicate the correct package names to make your code 'fully' compliant with the actual JSR.
I have not looked at JSR 180 myself, so I don't know how much extra work this would be, but I have in past done something similar with JSR 172 (XML/Web Services) where I wrote my own basic XML parser and web services wrapper.
即使不知道您的实际目标手机是什么,也可以肯定地说您不太可能向其添加新的 JSR。
一些 相关 答案 stackoverflow。
Even without knowing what actual handset you are targetting, it is safe to say that it is very unlikely you will be able to add a new JSR to it.
Some related answers on stackoverflow.