Use this command line option to choose whether AOT code should be generated using an older processor (Intel® Sandybridge) feature set on the x86 platform, which therefore allows the AOT code to be portable; it can be run on any Intel Sandybridge or newer processor without you having to choose a machine with a suitably old processor for generating the AOT code.
This feature is particularly relevant for packaging a shared classes cache into a container image (for example, applications deployed on the cloud in the form of Docker containers) because the processor on which the container image is built is likely to be different from the processor on which the container is deployed.
||Enable||See notes that follow|
This option is enabled by default in containers. To disable the option in a container, specify
The option is disabled by default outside containers. To enable the option outside a container, specify
-XX:+PortableSharedCache for the initial JVM instance (when the creation of the shared class cache happens) as well as for every subsequent instance that makes use of the same shared class cache.