Adding Exteneral Libraries to an Extension in 11gR2
By John 'Jb' Brock-Oracle on Aug 25, 2011
I mentioned this recently in a comment response, but it has come up enough times now, that it deserves it's own topic.
If this is a new project in 11gR2, you should already see a MANIFEST.MF file in your project in the same location as the extension.xml.
If you don't see it, add the file in the META-INF folder along with the extension.xml file.
Add the default 3 lines to the file of:
Adding an External Library
Using the default above, and this example line, the Bundle-ClassPath would look like.
Bundle-Classpath: ., external:$ORACLE_HOME$/jdeveloper/mydir/mylib/myjar.jarYou can verify that your external library is being added to the bundle by right-clicking on the project in the navigator panel, and selecting "Deploy To Target Platform". In the Deployment tab of the Log window, click on the link to the deployed package and open the manifest.mf file to make sure everything is listed as you want it to.
If you find that the MANIFEST.MF is not being merged after you do the "Deploy to Target Platform", do the following to force the merge.
Go to project properties and click on the Deployment section. Select the "Extension" deployment profile and click on Edit.
Add the path to your new MANIFEST.MF file to the "Add additional manifest files..." section.
You usually do not need to do the step above, but I have had people tell me that the merge isn't happening for some reason, and this fixes it in those cases.