The blog post Eclipse OpenJ9 performance; a bake-off on Windows mentions the Class Data Sharing (CDS) adapter required to enable OpenJ9 shared classes support for the OSGi Equinox framework. Since Eclipse Equinox 4.9 2018-09, the CDS adapter is included with Equinox builds.
When running with an Eclipse OpenJ9 JVM, to enable shared classes support for the Eclipse IDE or other products based on Equinox, follow one of these suggestions:
a) Start the IDE with the additional command line arguments -vmargs -Xshareclasses:name=eclipse
b) Add the following to the eclipse.ini file
-vmargs
-Xshareclasses:name=eclipse
After using the Eclipse IDE for a while, check the amount of space used in the shared cache by running java -Xshareclasses:name=eclipse,printstats
. If the free bytes
is close to zero, the size of the cache can be increased. For example by running java -Xshareclasses:name=eclipse,adjustsoftmx=80m
or any size up to the hard limit, which is 300m by default. The shared cache persists on disk until destroyed, the modified settings will be in effect for as long as the cache exists. Once an ideal size is determined, it can be hard coded by adding a -Xscmx option to the above examples.
1 Reply to “OpenJ9 shared classes with Eclipse Equinox 4.9+”