This topic describes techniques for managing the location and availability of JARs and WebLogic J2EE Shared Libraries in your projects and enterprise applications.
The IDE builds projects using project source files as well as JARs that are stored in the project, or available on the build path. Within the IDE, virtual copies of J2EE modules may be stored in the project, rather than physical copies. After build, the resulting module is deployed to the server. Modules may access runtime libraries available on the class path.
There are two types of libraries that you can add to a project or application
For more information on J2EE libraries, consult your WebLogic Server documentation locally or online. J2EE libraries can be:
You can:
You can add JARs to your projects by copying them to your project folders. Note that you may need to right click on the Package Explorer view and click Refresh to update the file list.
JAR files copied into the EarContent/APP-INF/lib directory of an EAR project are added to the buildpath of all projects included in the EAR. You do not need to configure project dependencies on such JAR files. Objects in the JAR will simply appear in the IDE and they will be available at build and deployment for all projects in the EAR.
JAR files copied into the WebContent/WEB-INF/lib directory of a web project are added to the buildpath of that project. The contents of the JAR file will appear in the IDE and they will be available at build and deployment for that single project only.
When creating a project in Workshop for WebLogic, the project facets that are selected for the project determine what J2EE libraries are required. You may also add or remove project facets after a project is created. J2EE libraries can be handled one of two ways:
When you create a web project, one of the screens allows you to specify whether this project will share J2EE libraries (Use Shared J2EE Libraries) or create a copy of the J2EE libraries in the current project (Do not use Shared J2EE Libraries. Copy all required JARs into the WEB-INF/lib directory).
This setting is persistent and affects how WebLogic J2EE shared libraries are handled if you later add/remove facets using the Project Facets properties page.
You may have access to other J2EE libraries that you want to use in more than one project. You can use these J2EE libraries in your projects by doing the following:
Click Add to add a new library:
When you have entered the library location, click OK to finish.
Click Add from the popup menu.
none.