Two days ago, I deleted five Java files in Eclipse IDE and now I need them. I tried to restore them from the local history. I restored only two of them. When I right click on the other files and then click restore from local history, I get the error message No additional members found in local history
. How can I restore those three files?

- 8,093
- 8
- 50
- 76

- 533
- 1
- 4
- 4
-
did you delete them from your filesystem as well? do you have them in your scm? – Marco Forberg Jun 25 '13 at 19:06
-
I just delete them from eclipse. Sorry I am new to java . What do you mean by scm? – Narges Sadri Jun 25 '13 at 19:25
-
scm = source control management system. If you delete files from eclipse, you are asked if you want to delete them from file system as well. if you did not check this they should still be there on your disk – Marco Forberg Jun 25 '13 at 19:30
-
1If it weren't for this question, I'd have lost my file because I wasn't aware of the option of **restore from local** – Anurag Awasthi Sep 05 '17 at 13:28
9 Answers
You can use the information in this Java Tips page (archived)
I deleted my src
folder, and used the following steps to get it back:
- Select Project
- Right Click
- Select Restore from local history in the context menu
- Select your files,
- Click OK.
-
1I know this is old but the OP says they already tried that. For me "You can use your operating system’s search tool to locate the files you are looking for" from [this answer](http://stackoverflow.com/a/969905/1706564) was the (obvious now I think about it!) answer. – Jamie Bull Feb 12 '16 at 19:12
-
@JamieBull suggestion worked for me. I just used grep in the directory and recovered what I was looking for. – Cornelius Lamb Oct 02 '20 at 12:03
-
1Anyway, this *SAVED me*. It seems that eclipse keep all changes into local history everytime we press `Ctrl + S`. – coding monster Feb 04 '22 at 15:11
Steps to recover the deleted files:
- Go to the project.
- Right click on the project.
- Select restore from local history.
- Select the file/files to recover.
Please see the attached image:
.

- 9,671
- 41
- 36
- 56

- 929
- 8
- 7
If you still have the binary form (.class), that is you only deleted the source code, then you can decompile then back to source.
Search on Google for some decompilers, for example Cavaj.

- 15,437
- 2
- 41
- 82
-
I have all .java files in eclipse. And when I click Refactor->history it shows All date even for two months ago. – Narges Sadri Jun 25 '13 at 19:57
Answer: You can't.. sorry :\
If restoring from local history does not work, then you are likely out of luck i'm afraid.
my suggestion is be more careful when deleting and use a Source Control Management software like SVN or Git, so you can version your files to prevent things like this from happening again.

- 28,221
- 15
- 85
- 110
-
So Why eclipse can restore just two of them? Why it can not restore others? – Narges Sadri Jun 25 '13 at 19:17
-
-
2http://stackoverflow.com/questions/969782/eclipses-local-history-where-are-files-saved – ddavison Jun 25 '13 at 19:24
-
Go to Eclipse Menu Bar , and click Edit, and then click Undo Delete Resource. Each time you click "Undo Delete Resource" it brings back resources that have been deleted. I am not sure if you can recover deleted resources, if you try to recover after the machine has been restarted since you deleted your resource.
You don't wanna run into this several times, to be safe please always use version control like Git, SVN, Mercurial.

- 31
- 2
In case you are using VCS like SVN or GIT you can just recreate the file with same name and in the same location that's enough.

- 182
- 1
- 10
It is very simple. You can use these steps:
Right click on the project of which you want to recover.
Select restore from local history.
Select the file/files to recover plus version too.

- 158,662
- 42
- 215
- 303

- 41
- 1
- 4
When you see the "No additional members found in local history" message while trying to retrieve the files after right-clicking a parent folder or package, try right-clicking the next immediate parent folder or package in the project (or the project itself as mentioned above). When I right-clicked the next immediate parent folder; I was able to restore deleted files in a similar situation.
You can use the information in this Java Tips page.
I deleted my src folder, and used the following steps to get it back:
--> Select Project
--> Right Click
--> Select Restore from local history in the context menu
--> Select your files,
--> Click OK.
--> Then go to your git and do "git checkout filename"
--> This should fully restore the file and its content
I hope this helps

- 11
- 2