Red Hat Bugzilla – Bug 878181
OpenJDK 1.7 does not create classes.jsa after installation
Last modified: 2012-11-19 20:47:15 EST
IBM contributed -Xshare option to Java (and OpenJDK as well):
$ java -X 2>&1 | grep share
-Xshare:off do not attempt to use shared class data
-Xshare:auto use shared class data if possible (default)
-Xshare:on require using shared class data, otherwise fail.
More about this: http://www.ibm.com/developerworks/library/j-sharedclasses/?ca=dgr-jw22ClassShareJRE&S_Tact=105AGX59&S_cmp=GRsitejw22
The option can be used to share classes and improve loading times, which can be dramatic. For Windows, classes cache is generated by default. In Fedora, the cache is not created.
I recommend to run the following command in the post installation section of the RPM package:
It creates about 25 MB file /usr/lib/jvm/java-1.7.0-openjdk-126.96.36.199.x86_64/jre/lib/amd64/server/classes.jsa
Using -Xshare user can take advantage of faster loading, it can be measure even on the hello world application (much more on big applications like Eclipse):
[lzap@lzapx Download]$ time java -Xshare:on -cp . HelloWorldApp
[lzap@lzapx Download]$ time java -Xshare:off -cp . HelloWorldApp
By default it should use the class cache if it is found, but this is not working (is this a bug?):
[lzap@lzapx Download]$ time java -cp . HelloWorldApp
Tested with F16 and F17, selecting rawhide as I expect this is not implemented.
*** This bug has been marked as a duplicate of bug 513605 ***