Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any Java VMs which can save their state to a file and then reload that state?

Are there any Java VMs which can save their state to a file and then reload that state?

If so, which ones?

like image 995
Ande Turner Avatar asked Jan 08 '09 14:01

Ande Turner


People also ask

What file will be used by the Java Virtual Machine?

A class file contains Java Virtual Machine instructions (Java byte code) and a symbol table, as well as other ancillary information. The class file format is the hardware- and operating system-independent binary format used to represent compiled classes and interfaces.

Does Java run in a VM?

All Java programs require a Runtime Environment. If you want Java apps to run at all, you'll need a JVM (Java Virtual Machine). Java code's main method is invoked by the JVM and JVM is part of the JRE (Java Runtime Environment). There is a Java application slang phrase called WORA (Write Once Run Anywhere).

How is Java VM implemented?

Its implementation has been provided by Oracle and other companies. An implementation Its implementation is known as JRE (Java Runtime Environment). Runtime Instance Whenever you write java command on the command prompt to run the java class, an instance of JVM is created.


1 Answers

Another option, which may or may not be relevant in your case, is to run the JVM (any JVM) inside a virtual machine. Most virtual machines offer the option to store and resume state, so you should be able to restart your PC, fire up the VM when it comes back up and have the Java process pick up from where it was.

I use VMWare Player for testing on IE at work, and this works as noted above when I close and later reopen it. I don't generally do this when apps are doing anything of note in the VM, but as long as they aren't accessing any external resources (e.g. network sockets), I would expect it to work as if the VM was never shut down.

like image 120
Andrzej Doyle Avatar answered Oct 02 '22 21:10

Andrzej Doyle