Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Importing project into Netbeans

Tags:

java

ide

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

like image 921
Piyush-Ask Any Difference Avatar asked Jul 24 '13 03:07

Piyush-Ask Any Difference


3 Answers

Try copying the src and web folder in different folder location and create New project with existing sources in Netbeans. This should work. Or remove the nbproject folder as well before importing.

like image 83
Survivor - 2012 Avatar answered Nov 15 '22 18:11

Survivor - 2012


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.

like image 43
Kyle Bridenstine Avatar answered Nov 15 '22 19:11

Kyle Bridenstine


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.

like image 41
Aarushi Mishra Avatar answered Nov 15 '22 18:11

Aarushi Mishra