Feb 22 2008

Open existing projects in NetBeans 6

Published by at 12:30 PM under Java,NetBeans

In this blog-entry i will show you, how to open and work with existing NetBeans 6 -projects. I was forced to write this, because while most of my projects here are created with NetBeans 6. Now watch how easily you can use NetBeans 6 for being productive.
For example, i am using the project “Hibernate with Guice“, you can read this blog-entry here.

1. Installing NetBeans 6

NetBeans IDE is open-source and free and runs on Windows, Linux, Mac OS X and Solaris.
Download: http://www.netbeans.org/
Installation Instructions: http://www.netbeans.org/community/releases/60/install.html

2. Open an existing project

On the menu, navigate to File->Open Project
Open project in NetBeans

Choose the existing project and open it.
Open existing projects in NetBeans 6 part 2

If you see the following error message, don’t get in panic, there are only missing references to needed libraries.
Open existing projects in NetBeans 6 part 3

Click on close. Now let us fix this problem. Make a rightclick on the project-name and select Properties.
NetBeans Project properties

You will now see the Project Properties window. On the left side, navigate to Libraries. In the Compile-Tab, the missing libaries are now visible.
NetBeans Project properties missing libraries

The next thing to do, is to clean up this mess. Just remove all libraries from the Compile-Tab. You can easily do this if you mark one library with the left mouse button and then press STRG + A together.
NetBeans Project properties remove missing libraries

Hit the remove button to clear the list.
NetBeans Project properties missing libraries are removed

The next step is to add the missing libraries. If you have downloaded them, click on Add JAR/Folder, navigate to the directory where the JARs are located, and add them all.
NetBeans Project properties add missing libraries

Close the Project Properties Window. Everything just have to look fine. The Project-Name is now in bold black and not anymore in bold red. Expand the project, you can see all included packages and libraries.
Netbeans projects view

3. Build and run the project

This is very easy. Make a rightclick on the projectname, choose Clean and Build.
Clean and build project in Netbeans

You can see the generated Output in the Output-console.
NetBeans generated output

Run the application by pressing F6 or make a rightclick on the project-name and choose Run
NetBeans run project

That’s it, you have successfully opened an existing project.

3. Working with NetBeans

To explore the java-code, you can navigate through the projects-view or through the file-view.
NetBeans project and file views

To open a file, just doubleclick on the name.

You need more functions? Go to Tools->Plugins.
NetBeans plugins

A huge list of available plugins appears. More plugins are available at http://plugins.netbeans.org/PluginPortal/

Installed NetBeans plugins

Enjoy playing around with NetBeans, you will see it makes fun to work with it.

All the SY0-101 and N10-003 professionals are of the view that before you write 642-812 or 70-431, you should figure out your preferences amongst 350-030 and 220-602.

Technorati Tags: , ,

3 responses so far

3 Responses to “Open existing projects in NetBeans 6”

  1. Dileep sagt:

    Hi Bolz,
    this entry is good and is clear to understand. Thanks for your efforts in writing this.
    But the only problem is with the downloading libraries. Even the keyboard keys are mentioned clearly for deletion of the libraries but there is no explanation about downloading libraries. It would be much more clear with that explanation.

    Anyways, this entry helped me a lot. Thanks again


  2. shripad bharde sagt:

    right clicking on project folder I am getting only view,refresh,new folder option.How can open this project folder as project on netbeans?

    Shripad Bharde

  3. AryanDev sagt:

    Hi, i have “NM 6 M2″. when i try to open any project it show error of “arryaindexoutofbounce “. i cant open any single project allready created… can u explain it???why pls send me Reply on my Mail Regarding this…