Profiles

From APIDesign

(Difference between revisions)
Jump to: navigation, search
Current revision (09:51, 5 March 2014) (edit) (undo)
 
Line 2: Line 2:
* Compact 1 (small, about 4600 classes)
* Compact 1 (small, about 4600 classes)
* Compact 2 (also adds [[XML]] and [[Derby|JDBC]] [[API]]s)
* Compact 2 (also adds [[XML]] and [[Derby|JDBC]] [[API]]s)
-
* Compact 3 (the rest except UI and [[CORBA]])
+
* Compact 3 (the rest except UI)
-
As [[Harmony]] story illustrates, [[profiles]] are the best thing since the invention of sliced bread. Moreover they are ready (at least if you are running [[Linux]]) right now. I've just tried:
+
As [[Harmony]] story illustrates, [[profiles]] are the best thing since the invention of sliced bread. Moreover they are ready (at least if you are running [[Linux]]) right now.
 +
 
 +
Adopting your [[API]], framework or application to smaller [[Profiles]] will require few tricks. Here is list of few of them that will help you [[LowerProfile]] of your system.
 +
 
 +
== Getting Started ==
 +
 
<source lang="bash">
<source lang="bash">

Current revision

JDK8 is about to provide three new profiles. In addition to classical, full, bloated Java runtime, there will be:

  • Compact 1 (small, about 4600 classes)
  • Compact 2 (also adds XML and JDBC APIs)
  • Compact 3 (the rest except UI)

As Harmony story illustrates, profiles are the best thing since the invention of sliced bread. Moreover they are ready (at least if you are running Linux) right now.

Adopting your API, framework or application to smaller Profiles will require few tricks. Here is list of few of them that will help you LowerProfile of your system.

Getting Started

$ hg clone http://hg.openjdk.java.net/jdk8/jdk8 openjdk8
$ bash ./get_source.sh
$ cd openjdk8
$ bash ./configure
$ make clean profiles

and after few (tens of) minutes I could switch to the profile image and test it on Felix:

$ cd build/linux-x86-normal-server-release/images/j2re-compact1-image/
$ ./bin/java -version
openjdk version "1.8.0-internal"
OpenJDK Runtime Environment (build 1.8.0-internal_2013_11_27_13_39-b00, profile compact1)
OpenJDK Server VM (build 25.0-b60, mixed mode)
$ ../bin/java -jar bin/felix.jar 
____________________________
Welcome to Apache Felix Gogo
 
g! lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (4.2.1)
    1|Active     |    1|Apache Felix Bundle Repository (1.6.6)
    2|Active     |    1|Apache Felix Gogo Command (0.12.0)
    3|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
    4|Active     |    1|Apache Felix Gogo Shell (0.10.0)
g!

And guess, it really runs! An OSGi container on top of compact1 profile! Great work on creating small common ground for JDK8 based libraries! Now everything on top of compact1 can be an OSGi bundle and we will all live in a harmony.

Personal tools
buy