I am experimenting with CRaC on Azul JVM. I have built a checkpoint of my program with
$JAVA_CMD -XX:CRaCCheckpointTo=cr -jar target/cractest-0.1.0-standalone.jar
And I can restore it successfully with
$JAVA_CMD -XX:CRaCRestoreFrom=cr
It works all right. In the next step, I want to pass arguments to the program on restore, so the program can pick it up, ideally just like the following:
$JAVA_CMD -XX:CRaCRestoreFrom=cr -- arg1 arg2 arg3
And normally I would access arg1 arg2 arg3
in the String[] args
parameter of main
, but since we are resuming a checkpoint, we don't have access to that array anymore.
How could I still access the parameters on checkpoint restore? Is it available in some context object during runtime?