关于getAppProperty()得问题,谢谢

Eric20 2004-08-25 12:26:38
我再编写一段J2ME代码时,用到了"getAppProperty()"这个函数,但其返回值却是"null",而程序也因此无法继续执行下去,令我十分郁闷.我非常想知道"getAppProperty()"这个函数的意义和具体用法,还请高手们指点,谢谢了.
...全文
103 2 点赞 打赏 收藏 举报
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
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.


  • 打赏
  • 举报
回复
相关推荐
发帖
J2ME
创建于2007-09-28

1.3w+

社区成员

Java J2ME
申请成为版主
帖子事件
创建了帖子
2004-08-25 12:26
社区公告
暂无公告