CDC Profiles

Foundation Profile[3]

[3] The discussion of the Foundation Profile refers to version 1.0a (May 29, 2002).

The Foundation Profile was developed by the JCP as JSR46.[4] Refer to the J2ME Foundation Specification for a definition of the APIs specified. It can be downloaded from http://java.sun.com/j2me/docs/.

[4] Refer to http://www.jcp.org/jsr/detail/46.jsp.

An implementation of the Foundation Profile must support the protocols specified by the CDC, and in addition must support sockets and HTTP.

Personal Basis Profile

The Personal Basis Profile is intended for the interactive television and automotive markets. It targets applications where full support is required for a non-GUI application. It provides the capability for basic user interface presentation, but it is not intended to support applications requiring a heavy-weight GUI. The Personal Basis Profile provides support for the AWT light-weight components only.

Refer to the Personal Basis Programmer's Guide[5] for information on the differences between the Personal Basis Profile and the PersonalJava Application Environment. At a high level, the main differences are:

[5] Refer to http://java.sun.com/j2me/docs/index.htm

  • PersonalJava targets the JDK 1.1.8, whereas the Personal Basis Profile targets JDK 1.3.

  • It was optional to include Remote Method Invocation (RMI) in PersonalJava. In the Personal Basis Profile, RMI is supported in an optional package.

  • A number of deprecated APIs are not included in the Personal Basis Profile.

The Personal Basis Profile was developed by the JCP as JSR129.[6]

[6] Refer to http://www.jcp.org/jsr/detail/129.jsp

Personal Profile

The Personal Profile is the J2ME migration path for PersonalJava applications, and was developed by the JCP as JSR62.[7] To the Personal Basis Profile it adds Web fidelity and support for the legacy PersonalJava Application Environment. The Personal Profile is the CDC Profile that is intended for PDAs. Applications written to the Personal Profile APIs are upwardly compatible with J2SE JDK 1.3.

[7] Refer to http://www.jcp.org/jsr/detail/62.jsp

The Personal Profile is intended for applications that require full JDK 1.1 AWT support (that is, heavy-weight GUI components). It specifies three application models:

  1. Applets. Standard JDK 1.1 applets.

  2. Xlets. An Xlet is a lifecycle management interface. An application manager manages an Xlet through methods defined in this interface. The manager causes the Xlet to change state. The defined states are Destroyed, Paused, and Active.

  3. Applications. Standard Java application, defined as a class with a public static void main(String[]) method.

The Personal Profile adds to the Foundation Profile in these packages:

  • java.applet

  • java.awt

  • java.awt.color

  • java.awt.datatransfer

  • java.awt.event

  • java.awt.image

  • java.beans

  • java.math

  • java.rmi

  • java.rmi.registry

  • javax.microedition.xlet

  • javax.microedition.xlet.ixc

Differences between Personal Profile and JDK 1.3

The packages and classes of the Personal Profile are typically subsets of the JDK 1.3 packages and classes.

There is a small set of APIs in Personal Profile that have restrictions on their usage. They are:

  • java.awt.AlphaComposite. Approximation of the SRC_OVER rule.

  • java.awt.Component. The implementation may ignore a call to set the visible cursor.

  • java.awt.Dialog. The implementation may limit the size, may prohibit resizing, may limit screen location, and may not support a visible title.

  • java.awt.Frame. The same restrictions of Dialogs may also apply to Frames.

  • java.awt.Graphics2D. Only instances of AlphaComposite may be used with setComposite().

  • java.awt.TextField. An implementation may prohibit setting the echo character.

In each case, a system property will be set to true if the restriction is in place for the implementation being used. These system properties have the following keys:

  • java.awt.AlphaComposite.SRC_OVER.isRestricted

  • java.awt.Component.setCursor.isRestricted

  • java.awt.Dialog.setSize.isRestricted

  • java.awt.Dialog.setResizable.isRestricted

  • java.awt.Dialog.setLocation.isRestricted

  • java.awt.Dialog.setTitle.isRestricted

  • java.awt.Frame.setSize.isRestricted

  • java.awt.Frame.setResizable.isRestricted

  • java.awt.Frame.setLocation.isRestricted

  • java.awt.Frame.setState.isRestricted

  • java.awt.Frame.setTitle.isRestricted

  • java.awt.TextField.setEchoChar.isRestricted

Differences between Personal Profile and PersonalJava

PersonalJava was the original Java for high-end devices and embedded applications, but it will be superseded by the Personal Profile. The Personal Profile is a new definition, based on J2ME. When the designers of the Personal Profile started defining it, they started with JDK 1.3, removed all the deprecated APIs and all the APIs that they deemed unnecessary for modern mobile devices. PersonalJava is based on JDK 1.1 APIs.

Differences between PersonalJava and JDK 1.1.8

PersonalJava 1.2 inherits the APIs from JDK 1.1.8, slightly modifies many of them, makes some optional, and adds some specific to PersonalJava. It also inherits some APIs from Java 1.2 to support fine-grained access control and code signing. Portability of code without modification from JDK 1.1.8 to PersonalJava is therefore possible but is dependent on the specifics of the application.

As a practical guide to the similarities of PersonalJava and JDK 1.1.8, Appendix E, "JDK 1.1.8 Demonstrations on PersonalJava 1.2," on page 225 lists which of the demonstrations included with the JDK 1.1.8 work with PersonalJava 1.2.

Most of the cases in which the application does not work in PersonalJava are owing to differences in the security APIs. Recall that PersonalJava borrows fine-grained security APIs from Java 1.2 rather than JDK 1.1.8. However, there is a great deal of similarity between JDK 1.1.8 and PersonalJava 1.2, so that source code is largely portable between the two platforms.

Personal Profile Implementations for PDAs

Because the Personal Profile specification is relatively new, there are no implementations for PDAs yet available. Insignia has plans to release an implementation of the Personal Profile in the (northern) summer of 2003.

The IBM WebSphere Micro Environment implements CDC/Foundation, but it has no Personal Profile implementation as yet.

PersonalJava Implementations for PDAs

The Insignia Jeode product is an implementation of PersonalJava 1.2, and is available on a range of PDAs (see Table 2.3, "J2ME Implementations Available on PDAs," on page 19).