Profiles

From APIDesign

(Difference between revisions)
Jump to: navigation, search
Line 35: Line 35:
</source>
</source>
-
And guess, it really runs! An [[OSGi]] container on top of ''compact1'' [[profiles|profile]]! Great work on creating small common ground for [[JDK]]8 based libraries! Now everything on top of ''compact1'' can be an [[OSGi]] bundle.
+
And guess, it really runs! An [[OSGi]] container on top of ''compact1'' [[profiles|profile]]! Great work on creating small common ground for [[JDK]]8 based libraries! Now everything on top of ''compact1'' can be an [[OSGi]] bundle and we will all live in a [[harmony]].

Revision as of 15:08, 27 November 2013

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 and CORBA)

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:

$ hg clone http://hg.openjdk.java.net/jdk8/jdk8 openjdk8
$ 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