Question

I accidentally deleted a very important folder through NetBeans. I was just working on my Netbeans project and accidentally deleted it and don't know how to recover it.

Is there a tmp folder that the deleted project is stored in.

Or am I forever doomed?

Thanks, Lucas

No correct solution

OTHER TIPS

Try this one: Right click on your project node -> History -> Revert Deleted

If you accidentally delete a folder on Netbean, the way to recover it is as follows. You can't revert deleted folders but you can revert deleted files. Follow these steps.

  • Recreate the folder you deleted in your Netbean project. (You may not be able to create the folder within Netbean, in that case you can use mkdir command to create the folder )
  • Right click that folder in Netbeans and go to History -> revert deleted (you should see a list of deleted files that relate to that particular folder.
  • Repeat for each folder and sub-folder

This has worked on windows and Linux

Did you delete a project or a folder?

If you deleted a project then dont fear, I have done the same thing in the past (Right clicked on the project and selected delete), but I was able to recover it with little effort.

When you delete a project in netbeans it should only delete the project build data, but not the ".java" files.

I was able to fix it like this:

  1. Starting a new project in netbeans (Give it a different name for now)
  2. Navigate to the location where the deleted project was stored
  3. Open the "src" folder, then drag the contents onto the "Source Packages" icon in new project, you can find that in the projects tab.

The folders will become packages, and the ".java" files will be loaded as classes just like it was before the crash. You may have to restore any libraries etc, but you should have all your code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top