I am running Eclipse 3.7. I am currently working on a Plug-In Project for a Application called Team Center. I was recently made aware of a jar file of SWT Widgets named Opal. So I am trying to figure out how to add the Jar File to my existing project. I have tried many different ways to do this. Nothing has worked so far.
Here are some of the things I have tried.
- Made a lib directory in my current project copied the jar file
- Build Path Configure -> Libraries -> Added the Jar
- Runtime tab -> Add -> selected the lib/jar file -> update build path
- Saved
- My project still compiles, but at runtime it fails and I get can’t load proxied handler errors
I have tried to create a plugin project just for the Jar File, then add the opal plugin to required Plug-ins. If the Opal project is closed, that reflects with the Opal plugin in my project.
Here is the way my current project works. It is a plug-in project and when I finish or change code.
- Build Project
- Export
- Deployable plug-ins and fragments
- Select my project plug-in
- Finish
- Then I copy the project.jar to the TeamCenter Application plug-ins directory
I am assuming that somehow I have to include the opal.jar in the project.jar. But right now I am at a total lost on how to do it.
In Eclipse Plugin Project click on your MANIFEST.MF file and go to the runtime tab. There should be a section “Classpath”. Try to add your lib there.
UPDATE
I’ve tried it and it has worked for me. I’ve executed following steps:
libfolder in itMANIFEST.MF, go to theRuntimetab and add the lib to theClasspathsectionlibfolder is recognized of the build process (Buildtab and lib folder should be checked)Run->Run Configuration...-> double click onOSGi Framework)Bundlestab check the new made project (Workspacesection) and uncheckTarget Platformfor nowAdd Required Bundleson the right sideTarget PlatformsectionApply, thenRunand your OSGi env will be started