What are *.snap files in eclipse?

2020-02-01 07:22发布

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?

标签: java eclipse
3条回答
▲ chillily
2楼-- · 2020-02-01 08:01

*.snap files 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.

查看更多
你好瞎i
3楼-- · 2020-02-01 08:04

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).

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.

查看更多
啃猪蹄的小仙女
4楼-- · 2020-02-01 08:10

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
查看更多
登录 后发表回答