15

i got that error and i can't add project in netbeans.. please teach me how to fix this

even if i rename my folder it doesn't work...

Kevin Lee
  • 1,079
  • 6
  • 17
  • 34
  • Without some more background information (what are you trying to achieve, your system, netbeans version...) it is hard to tell. – Matt Handy Mar 25 '11 at 10:19
  • 1
    i'm trying to add a project in netbeans. but it is rejecting it.. i have added it before but i can't see it in my files section.. the version of the ide is 6.9.1 – Kevin Lee Mar 25 '11 at 10:23

6 Answers6

24

Netbeans tries to add a folder (nbproject) to your project during import. If it is already there NB fails to add it. Move the existing nbproject folder to a different directory outside your project and try to import again.

See this question.

Community
  • 1
  • 1
Matt Handy
  • 29,855
  • 2
  • 89
  • 112
20

Delete the nbproject folder in your project directory and restart the IDE.

andr
  • 15,970
  • 10
  • 45
  • 59
jitu99
  • 201
  • 2
  • 2
7

I had a PHP project with maven pom.xml, with no nbproject directory and clear cache, and netbeans would refuse to create a new project from sources with that pom.xml in place. Had to remove pom.xml, create a project and put pom.xml back.

  • presence of pom.xml tells netbeans that the folder is a project. Only workaround is to either delete/rename the pom.xml file or disable the maven support in the IDE. – mkleint Jun 25 '13 at 07:27
  • if you have maven support installed, then it's a maven project. That's a consequence of having maven projects supported natively, without netbeans specific metadata. – mkleint Jun 26 '13 at 07:32
3

I fixed the problem with:

rm -r ~/.cache/netbeans
rm ~/.netbeans/.superId
Pietro
  • 12,086
  • 26
  • 100
  • 193
3

Instead of creating it as a New Project try Open Project if nbproject directory exists in your project root directory.

Mohammad Faisal
  • 5,783
  • 15
  • 70
  • 117
  • I hade the same problem, ie I could not see one of my projects in the project pane. However, it was still there in File->Open Recent Project. – Jean-François Beauchamp Jan 17 '14 at 21:09
  • @Jean-FrançoisBeauchamp: in `netbeans` if you close a project or move its code to some other directory then that project will be shown in `Open Recent Project` – Mohammad Faisal Jan 18 '14 at 09:17
0

This happen to me on MS Windows as well. Cause was netbeans.conf's

netbeans_default_options="-J-Dline.separator=LF"
olecom
  • 1