Header
Home | Sitemap Set as homepage | Add to favorites
  Search the Site     » Advanced Search
Sections



System Properties

by

image

System Properties

MIDP inherits the system property mechanism from CLDC (see Section 5.2.10, "Property Support"). In addition to the properties provided by the CLDC, the MIDP Specification defines the following additional properties that can be retrieved by calling the method java.lang.System.getProperty (see Table 20.1).

The microedition.locale property is a String that consists of the language, country code, and variant separated by "-" (Unicode U+002D), for example, "fr-FR" or "en-US". Note that this is different from the J2SE definition for Locale printed strings where fields are separated by "_" (Unicode U+005F).

Table 20.1. System properties defined by MIDP

System Property

Description

microedition.locale

The current locale of the device; may be null.

microedition.profiles

A blank (Unicode U+0020) separated list of the J2ME profiles that this device supports. For MIDP 2.0 devices, this property MUST contain at least "MIDP-2.0".

graphics/new_icon.gif microedition.commports

A comma separated list of ports that can be combined with a "comm:" prefix as the URL string to be used to open a serial port connection (see Section 15.8, "CommConnection").

microedition.hostname

The local hostname (if available).

This locale string can be used by a MIDlet to determine the locale for which the underlying device is configured.

The microedition.profiles property can be used by a MIDlet to ensure that the underlying platform supports the necessary profile(s) and profile version(s) that the application requires.


681 times read

Related news

» System Properties
by admin posted on Sep 26,2007
» Classes Derived from Java 2 Standard Edition
by admin posted on Jul 07,2007
» The HttpConnection Interface
by admin posted on Jul 08,2007
» MIDlet Suites
by admin posted on Jul 08,2007
» CommConnection
by admin posted on Jul 08,2007


More Top News
Cisco Wireless Networking
Most Popular
Featured Author