If you want to export the project so that it will be reopened from a NetBeans IDE:
Right click your project and choose to create a new folder. Name it lib and press OK. You will be able to see the folder if you go to the
Files
tab.Then put (copy) your libraries there.
Then go back to projects tab and right click the libraries node. Choose add JAR/Folder and point to where your jar you want to use is (inside the lib folder). Select the file and also make sure that you choose the Reference as: Relative Path option. Click open.
You will now be able to see your library if you expand the libraries node of your project.
Select your project and then choose
Export project to ZIP
from the file menu.
Thats it.
If you extract the created zip file you will see the lib folder with all the JAR files in it. Also if you go to the nbproject
and open the file project.properties
you will see some lines like file.reference.dom4j-1.6.1.jar=lib\\dom4j-1.6.1.jar
. I believe this is how Netbeans knows where to find the libraries you need.
If you want to migrate to Eclipse: http://www.coderanch.com/t/458555/vc/Export-Netbeans-Eclipse
If you want to be general then you should build your project with Maven
or Ant
. Every modern IDE (Eclipse,NetBeans,InteliJ) can understand these building tools.
Hope it helps you.