恢复由于先前异常退出Eclipse而丢失的Java源代码 [英] Recover lost Java source code due to previous abnormal exit of eclipse

查看:80
本文介绍了恢复由于先前异常退出Eclipse而丢失的Java源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在进行此操作时,几乎跨越3000行的Java代码在Eclipse代码窗口中打开.突然我的电脑死机了,我不得不重新启动它.后来当我打开eclipse时,它抛出了一些错误,说某些org.eclipse ...文件已损坏,不愿意将其写下来,我的错:(但是后来它在我的Java代码文件中显示无法读取工作区dir.metadata.plugins \ org.eclipse.core.resources.root.indexes \ properties.index的元数据".我重新启动了Eclipse以消除错误,但结果却很惨;Java代码文件为空.我担心的是,在上次备份后,我在此处进行了很多更改.

My java code which almost spanned 3000 lines was open on Eclipse code window as I was working on that. Suddenly my PC froze and I had to restart it. Later when I opened eclipse it threw some error saying some org.eclipse... file was corrupt, dint bother to write it down, my fault :( But later it showed "could not read metadata for workspace dir.metadata.plugins\org.eclipse.core.resources.root.indexes\properties.index" in my java code file. I restarted eclipse to get rid of the error, but the result was disastrous; the java code file was empty. My worry is, after my last backup, I had done a lot of changes to it here n there.

最后我能弄清楚.首先需要与当地历史进行比较:P

Finally I could figure it out. jst need to compare with local history :P

推荐答案

我不确定是否可行,但是您可以尝试以下两种方法:

Am not sure if this will work but you can give these 2 methods a try:

  1. 右键单击文件->团队->显示本地历史记录(尝试在历史记录视图"中查找文件)

如果失败,请尝试2.手动转到"Eclipseworkspace.metadata.plugins \ org.eclipse.core.resources.history"您可以找到以几个字母命名的文件夹列表,使用修改日期"列并打开其中的最新文件夹以获取您正在使用的最新文件.在该文件夹中,您会找到一些文件名不正常的文件,并使用文本编辑器打开文件以查找您要搜索的文件,如果可能,请尝试匹配文件的大小.

If this fails,try 2. Manually go to "Eclipse workspace.metadata.plugins\org.eclipse.core.resources.history" You can find a list of folders named with few letters, use the "Date Modified" column and open the latest of those folders to get the recent files you were working on. In that folder, you can find some files with unusual naming, open the files with some text editor to find the file you are searching for, if possible try to match the file size.

让我知道这是否有帮助.:)

Let me know if this helps. :)

这篇关于恢复由于先前异常退出Eclipse而丢失的Java源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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