Bug 878181 - OpenJDK 1.7 does not create classes.jsa after installation
OpenJDK 1.7 does not create classes.jsa after installation
Status: CLOSED DUPLICATE of bug 513605
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Deepak Bhole
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-11-19 14:55 EST by Lukas Zapletal
Modified: 2012-11-19 20:47 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-19 20:47:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukas Zapletal 2012-11-19 14:55:33 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:

java -Xshare:dump

It creates about 25 MB file /usr/lib/jvm/java-1.7.0-openjdk-

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
Hello World!

real	0m0.051s
user	0m0.038s
sys	0m0.012s

[lzap@lzapx Download]$ time java -Xshare:off -cp . HelloWorldApp
Hello World!

real	0m0.076s
user	0m0.061s
sys	0m0.012s

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
Hello World!

real	0m0.072s
user	0m0.054s
sys	0m0.017s

Tested with F16 and F17, selecting rawhide as I expect this is not implemented.
Comment 1 Andrew John Hughes 2012-11-19 20:47:15 EST

*** This bug has been marked as a duplicate of bug 513605 ***

Note You need to log in before you can comment on or make changes to this bug.