I delete my java program from java project in eclipse. The extension was .java and I don't know how to get back? I try (getdataback for NTFS) but I didn't get back my *.java file. Some solution?
-
3don't you use any version controll system? – Roman Mar 21 '10 at 19:50
-
2Do you have the `.class` files? (the compiled `.java` files) – Bart Kiers Mar 21 '10 at 19:50
3 Answers
If you are using Eclipse, it has the ability to restore deleted files. Right Click on your project, and then choose Restore from Local History... option.

- 176,835
- 32
- 241
- 292
Right click on your project and select "Restore from Local History", it might still be there.

- 124
- 10
If you still have the .class
files, or can get them back with a recovery tool, you can use a decompiler to try and convert (decompile) them back to .java
source files.
More info on decompilers for Java can be found here: https://stackoverflow.com/questions/31353/is-jad-the-best-java-decompiler
If you're looking for help on how to get deleted data back, Superuser.com would be a more suitable place to ask your question.
And next time, back up your files more often, or better, use a source control system like GIT or SVN (and back that up too, of courtse!).

- 1
- 1

- 166,582
- 36
- 299
- 288