是否有任何Java VM可以将其状态保存到文件然后重新加载该状态? [英] Are there any Java VMs which can save their state to a file and then reload that state?

查看:203
本文介绍了是否有任何Java VM可以将其状态保存到文件然后重新加载该状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何Java VM可以将其状态保存到文件然后重新加载该状态?

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

如果是,那么哪些?

推荐答案

另一个选项,在您的情况下可能相关或不相关,是在虚拟机内运行JVM(任何JVM)。大多数虚拟机都提供了存储和恢复状态的选项,因此能够重新启动PC,在VM恢复时启动VM并让Java进程从原来的位置开始。

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.

我在工作时使用VMWare Player进行IE测试,当我关闭并稍后重新打开它时,这就像上面说的那样工作。我通常不会在应用程序在VM中执行任何操作时执行此操作,但只要它们不访问任何外部资源(例如网络套接字),我希望它能够像VM永远不会关闭一样工作。

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.

这篇关于是否有任何Java VM可以将其状态保存到文件然后重新加载该状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆