To use the AppCDS archive, we issue the -Xshare:on command line option, as shown here:
java -Xshare:on -XX:+UseAppCDS -XX:SharedArchiveFile=ch2.jsa -cp ch2.jar Chapter2