eclipse 中的 *.snap 文件是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2026502/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:17:13  来源:igfitidea点击:

What are *.snap files in eclipse?

javaeclipse

提问by GuruKulki

I have so many projects in workspace. for every one or two weeks i have to search for *.snap file delete them. otherwise my eclipse will take lot of time to come up? So curious to know what are they? are they specific to java? as i have lots of java projects in my workspace?

我在工作区有很多项目。每隔一两周我就必须搜索 *.snap 文件删除它们。否则我的日食需要很多时间才能出现?很想知道它们是什么?它们特定于Java吗?因为我的工作区中有很多 Java 项目?

采纳答案by Suraj Chandran

*.snapfiles represent the changes in workspace state of the IDE during the runtime. This is mostly for eclipse crash recovery plan. When a crash happens these files are used to recover the state fo eclipse workspace.

*.snap文件表示运行时 IDE 工作区状态的变化。这主要用于eclipse崩溃恢复计划。当发生崩溃时,这些文件用于恢复 Eclipse 工作区的状态。

回答by Andreas Dolk

It looks like your eclipse platform is crashing quite often. Because otherwise, the snapshot files should not be there while the platform is not running. As the referenced page in roe's comment explains, they are just needed for crash recovery and are deleted during normal shutdown of the platform. Deleting them will make eclipse think, that no crash occurred but then it can't recover and you may have to refresh/rebuild your workspace (which may take the same time).

看起来您的 eclipse 平台经常崩溃。因为否则,当平台未运行时,快照文件不应该在那里。正如 roe 评论中引用的页面所解释的那样,它们仅用于崩溃恢复,并在平台正常关闭期间被删除。删除它们会使 eclipse 认为没有发生崩溃但随后无法恢复,您可能必须刷新/重建您的工作区(这可能需要相同的时间)。

I'd not delete those files except eclipse won't recover from a crash. Have a look at the eclipse workspace and platform log files if you have troubles with some plugins and fight the problem from this side (updating plugins or sending error reports) instead of deleting those files.

我不会删除这些文件,除非 eclipse 不会从崩溃中恢复。如果您在使用某些插件时遇到问题并从这方面解决问题(更新插件或发送错误报告)而不是删除这些文件,请查看 eclipse 工作区和平台日志文件。

回答by Florin

A very good solution for me was to:

对我来说一个非常好的解决方案是:

  1. Cut and Paste the .snap file in a separate folder
  2. Start and then Close Eclipse (after restarting I've noticed that some of my classes where not there)
  3. Put back the .snap file in the original place
  4. Start again Eclipse
  1. 将 .snap 文件剪切并粘贴到单独的文件夹中
  2. 启动然后关闭 Eclipse(重新启动后我注意到我的一些课程不在那里)
  3. 将 .snap 文件放回原来的位置
  4. 重新开始 Eclipse