Is it possible to save the current state of the application before exit and next time the application starts, it will pick up right where you left off? Like literally a snapshot of previous session (sort of like VirtualBox save state feature).
Share
It is possible to persist the execution state of an application, but it requires the application to be written in a specific way to achieve this.
One approach is to use an implementation of continuations for Java. (Google “continuations java” for more information and pointers to Java libraries that support this.)
Another approach is to use object serialization. However, this only snapshots the heap data structures. Execution state on the thread stack(s), etcetera cannot be preserved this way.
There is no general purpose all-of-JVM or application checkpointing in any edition of Java.