Java Reference
In-Depth Information
Appendix C
Compact Profiles
The Java Development Kit (JDK) consists of the Java Language, development tools such as Java compiler, debugger,
etc., and the Java Runtime Environment (JRE). The JRE is a subset of JDK and it consists of libraries, the Java virtual
machine, and deployment toolkits. Libraries in the JRE can be subdivided into the following four categories:
Lang and util base libraries
Other base libraries
Integration libraries
User interface toolkits
Before Java SE 8, the JRE distribution was based on the all-or-nothing strategy. There was only one bundle of
the JRE for a platform that contained libraries in all the four categories. This was a problem for resource-constrained
devices. Suppose you had developed an application for Raspberry PI that uses only the lang and util base libraries.
However, you had to deploy the full JRE that contained libraries in all the four categories. This simply used more space
on the device than needed.
Java SE 8 introduced the concept of compact profiles that is a way to define subsets of the JRE libraries. A JRE
bundle may contain one of those subsets of libraries or all libraries. The JRE containing a subset of the libraries is
called a compact profile; the JRE containing all libraries is called the full JRE as it used to be before Java SE 8. Now,
you can develop applications using JDK 8 and deploy them using one of the compact profiles to memory-constrained
small devices. You can have a compact profile that may take as little as 11MB of space on a device running on Linux.
Java SE 8 defines three compact profiles that are named as follows:
compact1
compact2
compact3
Each profile specifies a set of Java API packages. Any packages not contained in the three compact profiles are
part of the full JRE. Table C-1 lists the high-level library names in each compact profile and the full JRE.
 
Search WWH ::




Custom Search