[java] Importing project into Netbeans

My client just sent me the base project for development purposes. I think he just zipped the project folder and sent to me.

Now when I go to NetBeans, "New project with existing sources": First I see the error that "this project already contains build folder". I deleted the build folder from project and then I get the error "this project already contains a netbeans project".

Any idea what I am missing. I am used to Eclipse and new to Netbeans. The project structure sent to me by client is:

enter image description here

This question is related to java netbeans ide

The answer is


You may try creating a new project in netbeans and then copy and and paste the files into it. I usually experience this problem when the project wasn't created in netbeans.


I use Netbeans 7. Choose menu File \ New project, choose Import from existing folder.


From Netbeans 8.1 - there is an "Import from ZIP" option.

Go to Main Menu -> File -> Import Project -> from ZIP.

Browse your .ZIP file's location via Browse button.

If you have Java project depending on external Libraries, Netbeans will highlight & ask for "Resolving problems" in project, click on resolve, provide location in your file system containing required library files .e.g JARs etc & you will be good to go.


File >> New Project >> Java Project With Existing Source>Next >> Project Name(add a name for your project) >> Next>>Add Folder >> select your existing project source code from your Directory>>Next >> Finish

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Java Project With Existing Source


Since you already have all the files in a folder, say "Project", you simply have to open Netbeans and go to File -> Open Project (or Ctrl + Shift+ O on Windows) and then from the dialog box navigate to the folder containing the Folder "Project".

You will see in the dialog box of Netbeans a 'Java cup'. Well, that's your project.


Follow these steps:

  1. Open Netbeans
  2. Click File > New Project > JavaFX > JavaFX with existing sources
  3. Click Next
  4. Name the project
  5. Click Next
  6. Under Source Package Folders click Add Folder
  7. Select the nbproject folder under the zip file you wish to upload (Note: you need to unzip the folder)
  8. Click Next
  9. All the files will be included but you can exclude some if you wish
  10. Click Finish and the project should be there

If you don't have the source folder added do the following

  1. Under your projects directory tree right click on Source Packages
  2. Click New
  3. Click Java Package and name it with the name of the package the source files have
  4. Go to the directory location (i.e., using Windows Explorer not Netbeans) of those source files, highlight them all, then drag and drop them under that Java Package you just created
  5. Click Run
  6. Click Clean and Build Project

Now you can have fun and run the application.


If there is already a nbproject folder it means you can open it straight ahead without importing it as a project with existing sources (ctrl+shift+o) or (cmd+shift+o)


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to netbeans

Can't create project on Netbeans 8.2 I'm getting favicon.ico error Cannot find java. Please use the --jdkhome switch Netbeans 8.0.2 The module has not been deployed Error starting Tomcat from NetBeans - '127.0.0.1*' is not recognized as an internal or external command Cannot start GlassFish 4.1 from within Netbeans 8.0.1 Service area javac: invalid target release: 1.8 connecting MySQL server to NetBeans Starting of Tomcat failed from Netbeans Display Records From MySQL Database using JTable in Java

Examples related to ide

How can I view the Git history in Visual Studio Code? How to ignore a particular directory or file for tslint? How do I completely rename an Xcode project (i.e. inclusive of folders)? Where is the visual studio HTML Designer? How to disable gradle 'offline mode' in android studio? Android studio Error "Unsupported Modules Detected: Compilation is not supported for following modules" Android Studio was unable to find a valid Jvm (Related to MAC OS) QtCreator: No valid kits found Difference between WebStorm and PHPStorm package android.support.v4.app does not exist ; in Android studio 0.8