免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 968 | 回复: 0
打印 上一主题 下一主题

What are the defined J2ME system property name [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-11 21:18 |只看该作者 |倒序浏览

By Richard Marejka, November 2005


E-mail
  



Print-friendly Version

  

Download
-->



-->
Question

What are the defined J2ME system property names?  

-->
Answer

The various J2ME JSR documents define system property names that can be queried at runtime. These provide two services:

  • To indicate the availability of an optional package:
    For example, if the device supports the Location API for J2ME then the property microedition.location.version will be present. The value associated with it will be "1.0", to indicate compliance with JSR 179.
  • To provide platform-dependent configuration data
    For instance, the property microedition.commports is present in the MIDP 2.0 specification. Its value is a comma-separated list of ports you can use to build a URL, which the Generic Connection Framework can in turn use to create a javax.microedition.io.CommConnection object.

To query system properties use java.lang.System.getProperty(), as in:
        import    java.lang.*;
    String    value;
    String    key    = "microedition.pim.version";
    value    = System.getProperty( key );
    ...

This table lists the defined system properties, drawing them from JSRs that are in the public review, final ballot, or final state, as defined in the
Java Community Process
(JCP):
J2ME Defined System Properties
JSR
Property Name
Default Value¹
30
microedition.platform
null

microedition.encoding
ISO8859_1

microedition.configuration
CLDC-1.0

microedition.profiles
null
37
microedition.locale
null

microedition.profiles
MIDP-1.0
75
microedition.io.file.FileConnection.version
1.0

file.separator
(impl-dep)

microedition.pim.version
1.0
118
microedition.locale
null

microedition.profiles
MIDP-2.0

microedition.commports
(impl-dep)

microedition.hostname
(impl-dep)
120
wireless.messaging.sms.smsc
(impl-dep)
139
microedition.platform
(impl-dep)

microedition.encoding
ISO8859-1

microedition.configuration
CLDC-1.1

microedition.profiles
(impl-dep)
177
microedition.smartcardslots
(impl-dep)
179
microedition.location.version
1.0
180
microedition.sip.version
1.0
184
microedition.m3g.version
1.0
185
microedition.jtwi.version
1.0
195
microedition.locale
(impl-dep)

microedition.profiles
IMP-1.0
205
wireless.messaging.sms.smsc
(impl-dep)
205
wireless.messaging.mms.mmsc
(impl-dep)
211
CHAPI-Version
1.0
¹(impl-dep) indicates that the default value is implementation-dependent.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/38418/showart_298886.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP