Sharing Libraries in a Java Project

See Also 

You can configure most standard Java SE, Web, and Enterprise projects in a way that makes it easy to share libraries with other users. You can specify a location for libraries on which the project relies. You can also specify how the libraries are referenced from your project.

These options make it easy for you to handle the following situations:

You can make a project's libraries sharable when you create the project in the New Project wizard. You can convert an existing project to be sharable in the Libraries tab of the Project Properties dialog box.

To make a general Java project's libraries sharable upon project creation:

  1. Choose File > New Project.
  2. In the Java category of the wizard, select one of the standard templates. Then click Next.
  3. In the Name and Location page of the wizard, select the Use Dedicated Folder for Sharing Libraries checkbox.
  4. In the Libraries field, select the location for the libraries to be stored.

    If the libraries are already included in the IDE, those libraries will be copied to the folder that you have designated.

To make a web or enterprise project's libraries sharable upon project creation:

  1. Choose File > New Project.
  2. Select one of the standard templates in the Web or Enterprise category. Click Next.
  3. In the Name and Location page of the wizard, select the Use Dedicated Folder for Sharing Libraries checkbox.
  4. In the Libraries field, select the location for the libraries to be stored.

    If the libraries are already included in the IDE, those libraries will be copied to the folder that you have designated.

  5. (Optional) On the Server and Settings page, select the Copy Server JAR Files to Libraries Folder radio button.

To make an existing project's libraries sharable:

  1. Right-click the project's node and choose Properties.
  2. In the Project Properties dialog box, select the Libraries node.
  3. In the Libraries panel, click Browse to open the New Libraries Folder wizard.
  4. In the Library Folder page of the wizard, enter a location for the libraries and click Next.

    You can enter the location as a relative reference or an absolute reference.

  5. In the Actions panel of the wizard, verify the selected action for each listed library. In most cases, the IDE detects the most appropriate action for that library.

    The following actions are available:

  6. Click Finish to exit the Make Project Sharable wizard.
  7. Click OK to exit the Project Properties dialog box.

Notes:

See Also
Java Project Templates
About Standard Projects
About Free-Form Projects
Working with Projects
Project Tasks: Quick Reference

Legal Notices