无法在 Eclipse 中使用 DecimalFormat 类

发布于 2024-08-18 15:12:18 字数 280 浏览 16 评论 0原文

我正在通过最新的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

嘿看小鸭子会跑 2024-08-25 15:12:19

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

夏见 2024-08-25 15:12:19

重新阅读我对相关问题的回答 这里。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文