Compact Profiles

Compact profiles, introduced in Java SE 8, define subsets of the Java SE Platform API that can reduce the static size of the Java runtime on devices that have limited storage capacity.


A compact profile (or simply profile) is a subset of the full Java SE Platform API. Because they have smaller storage footprints, profiles can enable many Java applications to run on resource-constrained devices. Choosing a profile that closely matches an application's functional needs minimizes the storage devoted to unused functions.

Compact profiles address API choices only; they are unrelated to the Java virtual machine, the language proper, or tools.

There are three profiles, compact1, compact2, and compact3. Each profile includes the APIs of the lower-numbered profiles (compact2 is a superset of compact1). The full SE API is a superset of the compact3 profile. The following table shows the high-level composition of each:

  Preferences Accessibility IDL
  RMI-IIOP CORBA Print Service
  Sound Swing Java 2D
  AWT Drag and Drop Input Methods
  Image I/O    
compact3 Security1 JMX  
  XML JAXP2 Management Instrumentation
compact1 Core (java.lang.*) Security Serialization
  Networking Ref Objects Regular Expressions
  Date and Time Input/Output Collections
  Logging Concurrency Reflection
  JAR ZIP Versioning
  Internationalization JNDI Override Mechanism
  Extension Mechanism Scripting  

1. Adds kerberos, acl, and sasl to compact1 Security.
2. Adds crypto to compact2 XML JAXP.

These JDK 8 tools have explicit support for profiles:

Detailed Profile Composition

The following table lists the API packages in each of the compact profiles. The API Reference also defines profile composition.

compact1 compact2 Additions compact3 Additions java.rmi java.lang.instrument
java.lang java.rmi.activation
java.lang.annotation java.rmi.dgc
java.lang.invoke java.rmi.registry java.util.prefs
java.lang.ref java.rmi.server javax.annotation.processing
java.lang.reflect java.sql javax.lang.model
java.math javax.rmi.ssl javax.lang.model.element javax.sql javax.lang.model.type
java.nio javax.transaction javax.lang.model.util
java.nio.channels javax.transaction.xa
java.nio.channels.spi javax.xml
java.nio.charset javax.xml.datatype
java.nio.charset.spi javax.xml.namespace
java.nio.file javax.xml.parsers
java.nio.file.spi javax.xml.transform javax.xml.transform.dom javax.naming javax.xml.transform.sax
java.text javax.xml.transform.stax javax.naming.event
java.text.spi javax.naming.ldap
java.time javax.xml.validation javax.naming.spi
java.time.chrono javax.xml.xpath
java.time.format org.w3c.dom
java.time.temporal org.w3c.dom.bootstrap javax.sql.rowset javax.sql.rowset.serial
java.util javax.sql.rowset.spi
java.util.concurrent org.xml.sax
java.util.concurrent.atomic org.xml.sax.ext javax.xml.crypto
java.util.concurrent.locks org.xml.sax.helpers javax.xml.crypto.dom
java.util.function   javax.xml.crypto.dsig
java.util.jar   javax.xml.crypto.dsig.dom
java.util.logging   javax.xml.crypto.dsig.keyinfo
java.util.regex   javax.xml.crypto.dsig.spec
java.util.spi   org.ietf.jgss    


Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved.