Java SE Embedded 8 vs. Java ME CDC Comparison

Java SE Embedded 8 is a new release of Java SE technology that for the first time has the feature of Compact Profiles.  There are 3 new Compact Profiles that represent 3 new smaller Java SE Runtimes which are compatible subsets of the full Java SE 8 API specification.  The first Compact Profile, compact1, is the basis for a Java ME CDC converged product with Java SE Embedded.  This compact1 profile is a standard that is similar to Java ME CDC and Foundation Profile with the typical headless optional packages found in legacy CDC embedded devices.  This compact1 profile enables the migration of CDC headless applications to Java SE Embedded 8 while keeping the same small footprint that CDC embedded devices require.

Comparison

To provide the compatibility of Java SE Embedded 8 compact1 with Java ME CDC, the smallest set of API core library packages of Java SE 8 was chosen without omitting classes.  The logging and SSL packages were added as they are expected to be required on most embedded devices.  The choice of the minimal set of core library packages from Java SE 8 APIs along with careful consideration to size constraints provides the same level of functionality as the core libraries found in Java ME CDC and Foundation Profile.

In this table, you can see the package level descriptions of what compact1 profile of Java SE Embedded 8

compact1Core (java.lang.*)SecuritySerialization
 NetworkingRef ObjectsRegular Expressions
 Date and TimeInput/OutputCollections
 LoggingConcurrencyReflection
 JARZIPVersioning
 InternationalizationJNDIOverride Mechanism
 Extension MechanismScripting 

Fig. 1 compact1 package descriptions

As you can see, the above package descriptions map a set of functionality that is the most common set of libraries called by headless applications found on embedded devices in a similar fashion to the APIs that were chosen by the expert group for Java ME CDC and Foundation Profile.  The set of functionality allows for most embedded apps to run with the most advanced core library features of Java SE 8.

The benefits of having compact1 available as a Compact Profile instead of as the CDC specification of a Java ME stack, include:

  • A smaller Java environment than Java SE normally would require including less computing resources, opening up a new domain of devices previously thought to be too small for Java SE.
  • A smaller Java SE runtime environment which is better optimized for performance and start up time.
  • Elimination of unused Java SE server and desktop code, which is always a good idea from a security perspective.
  • Ability to bundle runtimes with each individual Java SE application.
  • A faster download time for bundled Java SE applications.
 
 
 

The typical size of a compact1 runtime is about 11MB.  So, at less than one-third the original size of the already optimized Java SE Embedded 7 headless release, you have a very capable runtime environment that is equivalent to Java ME CDC.  The specific packages found in compact1 should look familiar to the typical Java ME CDC programmer, who might be happy to see the addition of Annotation, Concurrent, Pref, Script, Time, and NIO which are new compared to CDC and Foundation Profile specs.
 

  


Fig. 2 compact1 package names

Other New Java SE 8 Embedded Features Not in Java ME CDC

There are some other new Java SE Embedded Features that are worth mentioning that have advanced in the Java SE stack since the days of CDC.  These include new features of the Hotspot VM which is the Java virtual machine that is now optimized and tuned for embedded devices while delivering the functionality of Java SE technology:  

  • Client VM: Parallelized for multicore CPUs and concurrency support
  • Generation GC
  • Tiered Compilation

New Security Features (not in CDC)

Also, there are these new security features that are above what CDC provided in the past:
  • New, more modern and more secure Encryption Algorithms: TLS 1.2, Elliptical Curve, RSA, etc.
  • New JCE Framework
  • New, faster hardware accelerated cryptography support (PKCS11)
  • New and updated set of root certificates (cacerts)

Summary

As you can see, Java SE Embedded 8 Compact Profiles with the initial compact1 profile is able to provide for the compatibility of the legacy Java ME CDC and Foundation Profile stacks, while giving the benefit of adding new features and functionality of Java SE 8 including a new Java SE 8 language features, new embedded-appropriate core library functionality, new advanced security features, and a new small virtual machine.