Compact Profiles Demonstrated

Following up on an article introducing compact profiles, the video that follows demonstrates how this new feature in the upcoming Java 8 release can be utilized.  The video:

  • Describes the compact profile feature and the rationale for its creation.
  • Shows how to use the new jrecreate utility to generate compact profiles that can be readily deployed.
  • Demonstrates that even the smallest of profiles (less than 11MB) is robust enough to support very popular and important software frameworks like OSGi.

The software demonstrated is in early access.  For those interested in trying it out before the formal release of Java 8, there are two options:

  1. Members of the Oracle Partner Network (OPN) with a gold membership or higher can download the early access Java 8 binaries of Java SE-Embedded shown here.  For those not at this level, it may still be possible to get early access software, but it will require a qualification process beforehand.
  2. It's not as intimidating as it sounds, you can pull down the source code for OpenJDK 8, and build it yourself.  By default, compact profiles are not built, but this forum post shows you how.  The reference platform for this software is linux/x86.  Functionally, the generated compact profiles will contain the pared down modules for each compact profile, but you'll find the footprint for each to be much larger than the ones demonstrated in this video, as none of the Java SE-Embedded space optimizations are performed by default.

Not having any premium privileges on YouTube, the maximum allowed length of a video is 15 minutes.  There's actually lots more to talk about with compact profiles, including enhancements to java tools and utilities (javac, jar, jdeps, and the java command itself) that have incorporated intelligence for dealing with profiles.

Hmm.  Maybe there's an opportunity for a Compact Profiles Demonstrated Part II?


Comments:

Thanks for taking the time to record this. It's great to see modularity progress in Java 8.
Where are compact profiles defined and documented? Can I create my own?
Have SDK tools (maybe javac itself) been enhanced to compute the smallest profile for a given application ?
In other words was there a way to statically detect that Felix would not load the bundle on the compact1 profile?

Posted by Alexis MP on August 14, 2013 at 07:52 AM EDT #

Hi Alexis,

To your questions:

1. In terms of documentation, the best place to look currently is the JEP (Java Enhancement Proposal for Compact Profiles http://openjdk.java.net/jeps/161). If you have access (OPN Gold) to the early access builds, there is some additional documentation in the bundle.

2. For Java 8 we are providing 3 defined subsets of the JRE and providing a tool called jrecreate that will enable you to do some customizations on the defined profiles themselves. For example, you can choose the type of VM (minimal, client, server) the should be associated with the created profile. The ability to create your own custom runtime based on the profile of your application is a feature we will be providing in Java 9.

3. Compact Profiles bring with it a series of enhancements to Java development tools. In particular, "javac -profile" will check to see if your source code references an api not in the specified profile. If that is the case, javac will not compile the source.

Posted by guest on August 14, 2013 at 09:14 AM EDT #

Video link seems to be missing.

Posted by guest on February 20, 2014 at 06:38 PM EST #

Try it now. Looks like Embedded YouTube URLs must now use https. Formerly it was http.

Posted by guest on February 20, 2014 at 07:10 PM EST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Jim Connors

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today