I'm trying to know whether creating a Class Data Sharing archive (by running java -Xshare:dump
) compiles byte code into native code.
There is not a lot of documentation about the internals of Class Data Sharing. The page I linked says that java -Xshare:dump
loads a set of classes from the system jar file into a private internal representation, and dumps that representation to a file.
But says nothing about whether this code is compiled or not.
(Possibly related: Speed up application start by adding own application classes to classes.jsa)
In both cases it's native code in the cache (see the discussion in the link you provided about regenerating the cache on machines of different architecture). The IBM JVM takes it further with more options and a nicer layout for clusters, but the Oracle one works too.