Add external jars into eclipse plugin project
(I know there is one option available create plugin from existing jar archives. and somewhere i read that adding external jars through build path doesn't work for plugin project in RTC )
I want to know a method other than this
Thank you
Accepted answer
Comments
You might have to export your library, if you put it into another plugin. See the plugin.xml tabs.
I did it following way
- Use Import>File System to import the jar files into your plugin project, say in the /lib directory.
- Use "Add..." to add the jars to the classpath section of the plugin.xml>Runtime tab.
- Use "New..." to add "." library back (with no quotes, of course).
- make sure your binary build exports the new jar files on the plugin.xml>Build tab.
- save
- on the project, use context menu>PDE Tools>Update Classpath to correctly add the jars to the eclipse project classpath.
This worked for me first time and in the "lib" folder it created Three more folders which are "com", "META-INF", "sqlj" and one file name "T4XAIndbtPkg.SJPeofile().ser"
I dont know how these folders and files were created but it worked for me.
When I opened "com" folder I felt like one of my jar was extracted in that folder showing all the list of packages which were contained in the jar file.
But It is not working now. What may be reason?
I did it following way
- Use Import>File System to import the jar files into your plugin project, say in the /lib directory.
- Use "Add..." to add the jars to the classpath section of the plugin.xml>Runtime tab.
- Use "New..." to add "." library back (with no quotes, of course).
- make sure your binary build exports the new jar files on the plugin.xml>Build tab.
- save
- on the project, use context menu>PDE Tools>Update Classpath to correctly add the jars to the eclipse project classpath.
This worked for me first time and in the "lib" folder it created Three more folders which are "com", "META-INF", "sqlj" and one file name "T4XAIndbtPkg.SJPeofile().ser"
I dont know how these folders and files were created but it worked for me.
When I opened "com" folder I felt like one of my jar was extracted in that folder showing all the list of packages which were contained in the jar file.
But It is not working now. What may be reasonMistakenly it got posted twice. I did above procedure to add external jar into plugin project but it is not working now. Am i missing something or am i doing something wrong
Thank you
I can't tell. When I did this way back, I got it working.