Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Add external jars into eclipse plugin project

How to add external jars into eclipse plugin project in RTC?
(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

0 votes


Accepted answer

Permanent link
 Please see https://jazz.net/forum/questions/93445/server-side-extension-and-spring/93470
vikrant kamble selected this answer as the correct answer

0 votes

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

  1. Use Import>File System to import the jar files into your plugin project, say in the /lib directory.
  2. Use "Add..." to add the jars to the classpath section of the plugin.xml>Runtime tab.
  3. Use "New..." to add "." library back (with no quotes, of course).
  4. make sure your binary build exports the new jar files on the plugin.xml>Build tab.
  5. save
  6. 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

  1. Use Import>File System to import the jar files into your plugin project, say in the /lib directory.
  2. Use "Add..." to add the jars to the classpath section of the plugin.xml>Runtime tab.
  3. Use "New..." to add "." library back (with no quotes, of course).
  4. make sure your binary build exports the new jar files on the plugin.xml>Build tab.
  5. save
  6. 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

Mistakenly 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.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,941

Question asked: Jun 23 '15, 5:59 a.m.

Question was seen: 10,121 times

Last updated: Jun 23 '15, 7:58 a.m.

Confirmation Cancel Confirm