Here are the reasons why a Java SE Mobile Profile is really needed:
- Java ME does not support all of the Java SE 5, 6, and 7 language features.
- Even though the Android platform is not a Java SE or Java ME implementation,
the Android platform supports Java SE 5 and 6 language features plus API's
found in Java SE 5 and 6 but missing in Java ME.
- Some Java ME implementations do not comply with the Java SE 5 or later memory
model. Requiring support for the Java SE 5 and later memory model will improve
portability of mobile applications to both desktop platforms and other mobile
platforms. Furthermore, many mobile devices use processors that are not based
on the x86 architecture, and requiring support for the Java SE 5 and later
memory model will improve consistency across mobile platforms since some of
these devices have processors that require memory barriers to ensure
correctness of volatile reads, volatile writes, and synchronization.
- Some of the Java SE 5 and later core API's are not available on Java ME
platforms, although implementations of many of the Java SE 5, 6, and 7 core
API's are usable on mobile platforms.
- Porting Java-based applications to mobile platforms is not always easy
because Java ME lacks language features and API's available in Java SE 5 and
later.
- Supporting the Java SE Concurrency Utilities API (JSR 166) on mobile
platforms improves portability, performance, and thread safety.
- Some of the JVM programming languages are dependent on features not available
on the Java ME platform. Adding support for API's that these programming
languages depend upon will enable mobile applications to be developed in other
programming languages. One of the API's that would be provided in the Java SE
Mobile Profile is support for JSR 292, which provides support for dynamically
typed languages on the Java SE platform.
- The standard profile of Java SE has a lot of classes that are currently
required by the Java SE specification, but providing a mobile profile that does
not require the implementation of all of the classes required by the Java SE
standard profile will reduce the footprint while retaining compatibility and
portability. Java SE Mobile Profile implementations must implement all of the
classes and methods required by the Java SE Mobile Profile specification.
- Advances in mobile device technology allow for a footprint that is larger
than the Java ME implementation. These mobile devices can take advantage of a
Java SE Mobile Profile implementation, which has a smaller footprint than a
typical Java SE implementation.
Here are the goals of the Java SE Mobile Profile:
- Provide a smaller footprint for mobile devices
- Support all Java SE 5, 6, and 7 language features
- Provide support for a subset of the Java SE 6 and 7 API's on mobile platform
- Improve competition against Android-based devices, Apple iOS-based devices,
and Microsoft Windows Mobile devices
- Ease porting of Android-based and Java ME-based applications to the Java SE
Mobile Profile
- Improve portability of Java SE applications to mobile platforms
- Make it easier to develop Java-based applications for mobile platforms
- Make it easier to share code with both mobile platforms and desktop platforms
(at both the binary and source code levels)
- Support a mobile version of the NetBeans platform on the Java SE Mobile
Profile. There is already a mobile version of the Eclipse Platform called eRCP,
but eRCP is based on Java ME plus the Eclipse eSWT API. NetBeans Platform 6.9
and later is dependent on Java SE 6 APIs and language features. The Java SE
Mobile Profile will make it possible to support a mobile version of the
NetBeans platform.
Here is a list of some of the packages that would be part of the Java SE Mobile
Profile:
- java.applet
- java.awt
- java.awt.color
- java.awt.datatransfer
- java.awt.event
- java.awt.font
- java.awt.geom
- java.awt.im
- java.awt.image
- java.beans
- java.dyn
- java.io
- java.lang
- java.lang.ref
- java.lang.reflect
- java.math
- java.net
- java.nio.channels
- java.nio.channels.spi
- java.nio.charset
- java.nio.charset.spi
- java.nio.file
- java.nio.file.attribute
- java.nio.file.spi
- java.rmi
- java.rmi.registry
- java.security
- java.security.acl
- java.security.cert
- java.security.interfaces
- java.security.spec
- java.sql
- java.text
- java.util
- java.util.concurrent
- java.util.concurrent.atomic
- java.util.concurrent.locks
- java.util.jar
- java.util.zip
- javax.imageio
- javax.imageio.event
- javax.imageio.metadata
- javax.imageio.stream
- javax.security.auth.x500
- javax.sql
- javax.swing
- javax.swing.border
- javax.swing.event
- javax.swing.plaf
- javax.swing.table
- javax.swing.text
- javax.swing.tree
- javax.swing.undo
A Java SE Mobile Profile implementation could be provided by adapting the
OpenJDK7 class library and removing classes that are not needed on mobile
devices. A VM implementation could be provided by either optimizing the HotSpot
VM found in OpenJDK 7 to minimize the footprint and provide performance on
mobile devices, or modifying the phoneME VM to support Java SE 5, 6, and 7
features and the Java SE mobile profile. JVM implementations targeting the Java
SE mobile profile can be easily retargeted to support the Java SE standard
profile in the following use cases:
- Netbooks
- Virtualized servers
- Virtualized desktops