J2ME Run-Time Environment

A MIDlet is a J2ME application designed to operate on an MIDP small computing device. A MIDlet is defined with at least a single class that is derived from the javax.microedition.midlet.MIDlet abstract class. Developers commonly bundle related MIDlets into a MIDlet suite, which is contained within the same package and implemented
simultaneously on a small computing device. All MIDlets within a MIDlet suite are considered a group and must be installed and uninstalled as a group (Figure 3-2).
一个MIDlet是在MIDP小型计算设备上运行的一个J2ME应用。MIDlet必须是一个从java.microedition.midlet.MIDlet抽象类中继承的类。开发者通常将一组相关的MIDlet绑定到一个MIDlet套件中。MIDlet套件包含在一个包中,并同时在设备上运行。一个MIDlet套件中的所有MIDlet被认为是一个组,必须同时被安装或卸载。

Members of a MIDlet suite share resources of the host environment and share the same instances of Java classes and run within the same JVM. This means if three MIDlets from the same MIDlet suite run the same class, only one instance of the class is created at a time in the Java Virtual Machine. A key benefit of the relationship among MIDlet suite members is that they share the same data, including data in persistent storage such as user preferences.

MIDlet套件中的成员共享主机的资源,共享在同一个JVM中Java类的实例。这意味着如果有同一个MIDlet套件中的三个MIDlet运行同一个类,JVM中一次只有一个类的实例被创建。MIDlet套件成员间的这种关系的一个主要优点是它们能共享数据,包括如用户参数等持久化存储的数据。

---------------smart split line--------------------

Sharing data among MIDlets exposes each MIDlet to data errors caused by concurrent read/write access to data. This risk is reduced by synchronization primitives on the MIDlet suite level that restrict access to volatile data and persistent data. However, if a MIDlet uses multi-threading, the MIDlet is responsible for coordinated access to the record store.

在MIDlet之间共享数据使得每个MIDlet都暴露在由同时读写访问导致的数据错误下。这种出错的风险通过MIDlet套件级别的同步来降低。这种同步限制了易变数据和持久数据的访问。如果一个MIDlet使用多线程,则MIDlet自身需要实现对记录存储访问的同步

---------------smart split line--------------------

A MIDlet suite is installed, executed, and removed by the application manager running on the device. The manufacturer of the small computing device provides the application manager. Once a MIDlet suite is installed, each member of the MIDlet suite is given access to classes of the JVM and CLDC by the application manager. Likewise, a MIDlet can access classes defined in the MIDP to interact with the user interface, network, and persistent storage.

计算设备上的应用管理器负责安装、执行和删除一个MIDlet套件。而应用管理器则由设备制造商提供。一旦MIDlet套件安装成功,套件中的每个成员均能够通过应用管理器访问JVM中的类和CLDC。同样,一个MIDlet可以通过访问MIDP中定义的类来与用户界面,网络和持久存储进行交互。

The application manager also makes the Java archive (JAR) file and the Java application descriptor (JAD) file available to members of the MIDlet suite.
应用管理器也使MIDlet套件成员能够访问JAR文件和JAD文件。


你可能感兴趣的:(职场,Environment,j2me,休闲,Run-Time)