top
6.10. JRE packages tuning
Some packages are part of the JRE, but could be provided by tier libraries.
Some examples of package in this case are:
javax.xml.stream
package is provided by the JRE, but also by Apache Geronimo Spec bundles (and the implementation of provided by Woodstox).com.sun.org.apache.xerces.internal.dom
package is provided by the JRE, but also by Aapche Xerces.javax.activation
package is provided by the JRE, but also by Apache Geronimo Spec bundles.javax.annotation
package is provided by the JRE, but also by Apache Geronimo Spec bundles.- etc ...
We should define in the Karaf instance which packages should be provided by the JRE or by tiers bundles.
Moreover, we should manage of the exported packages of JRE depending of the JRE version: the JRE 1.6 provides more packages
than the 1.5 one.
To customize this in Karaf, you can tune the etc/jre.properties
file.
In the etc/jre.properties
file, you have two properties jre-1.5
and jre-1.6
.
They allow you to define the packages exported by the JRE (in function of the runtime version).
Each property provide the exhaustive list of packages provided by the JRE (and so part of the sytem packages).
For instance, a "standard" Karaf distribution provides the following etc/jre.properties
:
For instance, if we deploy the Apache Geronimo Specs bundle providing the javax.xml.stream
package, we have to comment
the javax.xml.stream
package in the the jre-1.6 definition. Indeed, jre-1.5 doesn't provide javax.xml.stream
, it's
new in the JRE 1.6: