7

I've been getting this error message when I want to create a new project in NetBeans. There are two old answers for this question, Project Folder already exists and is not empty- Error in netbeans and Netbeans error: Project Folder already exists and is not empty. Not only they are addressed for NetBeans 7, but also they didn't work.

I tried:

  • deleting project directory,
  • deleting userdir under C:\Users..\AppData\Roaming\NetBeans,
  • deleting cache under C:\Users..\AppData\Local\NetBeans,
  • uninstalling and installing 8.0.2
  • updating JDK to 8.40

but none of them worked!

I really appreciate if you'd suggest a solution. Thanks already!


SOLVED: I uninstalled NetBeans from C directory and installed it to the D directory. Then while creating a new project I choose a directory under D. It works fine now!

Community
  • 1
  • 1
patti_jane
  • 3,293
  • 5
  • 21
  • 26
  • Restart the system and try again. – αƞjiβ Mar 26 '15 at 20:04
  • neither of restarting netbeans nor the pc don't work. – patti_jane Mar 26 '15 at 20:09
  • 1
    When you create a project netbeans creates a directory called nbproject where it stores information about your project in an xml file called project .xml. Deleting that directory should work. It usually gets created at the root of your project directory so I'm baffled since you said you deleted your project directory. This is usually what i do when I get this exact same error – atomCode Mar 26 '15 at 20:15
  • What if you change the project location when you create a new project? Normally projects are stored (in Windows 7) in `C:\Users\yourname\Documents\NetBeansProjects` – WonderWorld Mar 26 '15 at 20:21
  • nbproject directory is located in project's directory, right? but my problem is i dont have an existing project directory, i just want to create a new one but i couldn't. sorry if I get your suggestion wrong :/ – patti_jane Mar 26 '15 at 20:21
  • @WonderWorld it also did not work.. – patti_jane Mar 26 '15 at 20:22
  • Have you tried looking at https://forums.netbeans.org/ probably a good place to look for answers also. – WonderWorld Mar 26 '15 at 20:24
  • @WonderWorld yes, i've tried. this one is rather recent https://netbeans.org/bugzilla/show_bug.cgi?id=236560, but it is again adressed to netbeans 7 and suggests that the problem will disappear with the installation of newer version. Maybe I should try asking there, thank you. – patti_jane Mar 26 '15 at 20:27
  • https://netbeans.org/bugzilla/show_bug.cgi?id=250403 it seems you're not the only one. Do you use windows 64bit also by any chance? – WonderWorld Mar 26 '15 at 20:33
  • @patti_jane http://forums.netbeans.org/ntopic29606.html maybe usefull – WonderWorld Mar 26 '15 at 20:38
  • yes, 64bit windows8. do you think its the problem? – patti_jane Mar 26 '15 at 20:39
  • @WonderWorld thanks for taking your time. i'll look it up a little more. – patti_jane Mar 26 '15 at 20:46
  • @patti_jane In appdata\roaming\Netbeans\ are there older netbeans folders then the one you currently using? If so delete those. I don't know about the 64bit issue. The problem could be that sometimes when you install a program on a 64bit version "\Program Files (x64)\" gets added and that causes problems, Just guessing btw. A solution could be to create a "Program Files" without that and install Netbeans there and see if the problem still occurs – WonderWorld Mar 26 '15 at 20:46

5 Answers5

2

There is a 99% chance that this is caused by your antivirus application.

You can check on allow file modification for NetBeans in your antivirus application.

I have Bit-defender total security 2018, so if you have it follow me:

  • Open Bit-defender
  • On protection tab click on (View features >)
  • Either you disable (Safe Files) or allow access for NetBeans.

By the way I think Bit-defender is blocking applications to access files on the C drive if I'm not mistaken, so that's probably why it worked for you when you put it on the D drive...

TT.
  • 15,774
  • 6
  • 47
  • 88
0

Go to Program Files, delete the NetBeans folder and reinstall it.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
kshitiz
  • 11
0

Go to C:\Program Files (x86) and delete NetBeans Folder And try to install it again

0

This might be because of your antivirus. I got the same problem sometime back. I then switched off the DataLocker option in my antivirus app, after this the problem didn't recur.

Swaps
  • 1,450
  • 24
  • 31
0

I had the same problem when i was messing around with some templates, after undoing the edits and saving the error message stopped occurring.

When netbeans says project folder already exists, it isn't a total error. It still creates the project, it just ran into an error while re-creating one of the template files. If you have the original tab still open, all you have to do is undo to the point before you ruined some template.

Uninstalling and re-installing will fix the problem but i hope this knowledge helps.