Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 06:17, 19 November 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

中文 JAD

From Wiki
Jump to: navigation, search
WP Metro Icon Chinese.png
Article Metadata

文章
翻译:
翻译自: JAD
kcomex
最后由 hamishwillee 在 19 Nov 2013 编辑

Java应用程序描述(Java Application Descriptor,JAD)是一个用来描述MIDlet或者MIDlet套件的文本文件,它是同JAR文件一同发布的。该文件需要具有一个名为.jad的后缀,文件名可以由开发者任意定义。

这个文件中的内容,对于手机操作系统判断MIDlet的名称、API需求、图标等信息来说,十分必要十分有用,尤其是在进行JAR文件下载之前。

该文件的语法是:

键名称: 键值
键名称2: 键值2


有很多托管属性是在JAD文件中必须声明的(或者在JAR的Manifest清单文件中声明), 当然你也可以在JAD文件中插入自己定义的属性键值,用来被你的MIDlet调用,例如服务器地址信息等等。自己创建属性键值的唯一限制就是,这些属性名称不能以"MIDlet"或者"MicroEdition"开头。

托管信息

  • MIDlet-1: 定义了第一个MIDlet,就是主MIDlet的类名称。
  • MIDlet-Jar-Size: 定义了要安装的JAR文件的大小,单位为字节。
  • MIDlet-Jar-URL: 定义了JAR文件的下载地址。在这一项中可以仅仅写上JAR文件的文件名即可,默认的下载路径会被添加在文件名之前(比如 http://domain.com/jarfile.jar)。
  • MIDlet-Name: 定义了MIDlet在手机菜单中的显示名称。
  • MIDlet-Vendor: 定义了开发该MIDlet的公司名称
  • MIDlet-Version: 定义了该MIDlet的版本信息

MicroEdition-Configuration: 定义了MIDlet兼容的配置信息,比如CLDC-1.1 MicroEdition-Profile: 定义了MIDlet的模式信息,比如 MIDP-2.0

相关链接

This page was last modified on 19 November 2013, at 06:17.
356 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×