Reduce The Download Size of Java Applications

Excelsior JET is a certified Java SE 8 JVM with an Ahead-Of-Time (AOT) compiler and installation toolkit.

Scales

One of the features introduced in Java SE 8 are compact profiles. Compact profiles define subsets of the Java SE Platform API that can reduce the static size of the Java runtime. However, they are only available in Java SE Embedded, not in the convertional Oracle JDK.

Excelsior JET 11.3 enables you to deploy your desktop and server Java applications using Java SE compact profiles to reduce the installation package size.

In addition, the versions for 32-bit Windows and Linux include the Global Optimizer and dedicated disk footprint reduction features.

Want to give it a try? Download a free trial.

FAQ

What Java SE components can be removed?

To quote the official documentation:

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:

Full SE API Beans JNI JAX-WS
  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
compact2 JDBC RMI XML JAXP
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.

This essentiually means that if your application only uses Java SE Platform API classes from one of the compact profiles, all APIs from the superserts of that profile can be excluded from the resulting installation package. Each API component may comprise:

  • public API classes
  • implementing classes (one or more packages)
  • native method libraries and associated resource files, such as fonts

Note also that JavaFX is not part of the Java SE Plarform and need not be included with applications that do not use it.

Does it help reduce disk footprint of Java applications?

Yes, of course. Depending on the profile, the minimal footprint of a Java application compiled for Windows/x86 is as follows:

    Compact1: 15.5MB
    Compact2: 16.6MB
    Compact3: 17.3MB
    Full: 24MB

As you may see, the disk footprint of the optimized applications is much smaller that the footprint of the Oracle JRE alone.

When compact profiles cannot help?

If your Java application contains tens of thousands of classes or has to be distributed with large data files, the use of compact profiles may have only a minor impact on the size of the resulting installation package.

How do compact profiles compare to modularized JDK (Project Jigsaw)?

As modularized JDK is not yet ready (was scheduled for Java 7, then Java 8, and is finally coming in Java 9), it cannot be compared to compact profiles yet simply because what is planned and what will be finally implemented may differ.

Nevertheless, we believe that Project Jigsaw is a step in the right direction.