关于getAppProperty()得问题,谢谢

Eric20 2004-08-25 12:26:38
我再编写一段J2ME代码时,用到了"getAppProperty()"这个函数,但其返回值却是"null",而程序也因此无法继续执行下去,令我十分郁闷.我非常想知道"getAppProperty()"这个函数的意义和具体用法,还请高手们指点,谢谢了.
...全文
142 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ashram 2004-08-25
  • 打赏
  • 举报
回复
呵呵,楼上的回答的好轻松啊,把doc拷下来就好了。其实你说的我知道 ,但我关心的是到底有那些key可以用?????不然这个函数还是没用
goodnow 2004-08-25
  • 打赏
  • 举报
回复
此方法由应用管理软件提供给MIDlet应用程序一个命名属性检索机制。
估计是你的属性名key不对。

public final String getAppProperty(String key)

Provides a MIDlet with a mechanism to retrieve named properties from the application management software. The properties are retrieved from the combination of the application descriptor file and the manifest. For trusted applications the values in the manifest MUST NOT be overridden by those in the application descriptor. If they differ, the MIDlet will not be installed on the device. For untrusted applications, if an attribute in the descriptor has the same name as an attribute in the manifest the value from the descriptor is used and the value from the manifest is ignored.

Parameters:
key - the name of the property

Returns:
A string with the value of the property. null is returned if no value is available for the key.

Throws:
NullPointerException - is thrown if key is null.


13,100

社区成员

发帖
与我相关
我的任务
社区描述
Java J2ME
社区管理员
  • J2ME社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧