无法在 Eclipse 中使用 DecimalFormat 类
我正在通过最新的 eclipse IDE 开发一个黑莓项目。我想使用 DecimalFormat 类,但是,我注意到 eclipse 无法识别该类。即使我将 JDK 合规级别更改为 1.5,该项目可以正常重建,但仍然无法识别它(因此您仍然会看到该类带有红线下划线)。即使您尝试从 java.text 包导入该类,Eclipse 也无法识别该包,并且只是说“无法解析导入 java.text”。
那么我做错了什么?或者我只是坚持接受黑莓项目永远不会识别某些java类的事实?
先感谢您。再会。
交流电
i am developing a blackberry project through the latest eclipse IDE. i am wanting to use the DecimalFormat class, however, i have noticed that eclipse doesn't recognize this class. Even if i change the JDK compliance level to 1.5, the project rebuilds fine but it still won't recognize it (so you still see the class underlines with red lines). Even if you were to attempt to import the class from the java.text package, eclipse doesn't recognize that package and simply says "the import java.text cannot be resolved".
so what am i doing wrong? or am i just stuck accepting the fact that a blackberry project will NEVER recognize certain java classes?
thank you in advance. good day.
ac
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
DecimalFormat 不是 BlackBerry API 的一部分
BlackBerry 4.5 API
将需要使用 MessageFormat 改为
DecimalFormat is not part of the BlackBerry API
BlackBerry 4.5 API
You are going to need to use MessageFormat instead
重新阅读我对相关问题的回答 这里。 J2ME 是 J2SE 的子集,因此会缺少许多类,例如 DecimalFormat 类。
Re-read my answer to your related question here. J2ME is a subset of J2SE so there will be many classes missing, such as the DecimalFormat class.