I need your help. I want to add the swtChart to my RCP project but it´s not working! I understood that I have to add the org.swtchart_0.9.0.v20140219 to my lib folder and then configure it in built path, in fact, I can see that the code is compiling and I can see the class Chart in org.swtchart, so I don´t understand why the error message is "java.lang.ClassNotFoundException: org.swtchart.Chart". Are there something else to do when installing an external plugin. Sorry I`m new in RCP/SWT. Thanks a lot!
Asked
Active
Viewed 412 times
1 Answers
1
Just adding a jar to the Java Build Path is not correct for an Eclipse plugin.
The swtchart jar is an Eclipse plugin so for an RCP you should add the swtchart plugin to your Target Platform and make your plugin depend on the swtchart plugin.
You should then include the swtchart plugin in the plugins that are included in the RCP build (if you are using a .product file this means including the swtchart plugin in the Dependencies)
You can also just use swtchart as a jar in your plugin. In this case you must use the MANIFEST.MF editor to add the jar to the plugin Classpath (on the Runtime tab). You must also include the jar in the build - the Build tab of the manifest editor.

greg-449
- 109,219
- 232
- 102
- 145
-
thanks Greg. could you recommend me some tutorial or post in StackOverFlow for doing the steps you told me? because I was looking for for hours and I can´t find how to configure a plugin in RCP. I don´t know if I have to put the .jar directly in plugin folder and/or configure my plugin.xml, etc etc...sorry, the guy who made the RCP application is not here so it´s very difficult for me! thanks again! – Monik Eliz Jun 22 '15 at 14:31
-
Greg, I could resolve the problem, just adding the classpath in MANIFEST.MF (tab runtime), it wasn´t necessary to include in manifest editor because it was automated. I don´t know how to give you points and close the question, could you tell me? Thanks again! – Monik Eliz Jun 23 '15 at 06:31
-
You [accept](https://stackoverflow.com/help/accepted-answer) an answer by clicking the tick mark next to the answer. – greg-449 Jun 23 '15 at 06:58