Reputation: 1391
Here are the steps that I have completed.
Runtime Tab in MANIFEST.MF
Right Click Project
When I run my plug-in project application, and try to access a command using a PDFRenderer command, I get following error.
org.eclipse.core.runtime - org.eclipse.ui - 0 - Unhandled event loop exception java.lang.NoClassDefFoundError: com/sun/pdfview/PDFFile
I know that it is not finding the PDFRenderer Library.
But I am not sure why it is not finding the class?
I am assuming that by adding the PDFRenderder.jar to the plug-in project Referenced library and adding that to the class path. It incorporates the PDFRenderder.jar in to my plug-in project jar file. I don't have to copy PDFRenderder.jar to Teamcenter/plug-ins dir as well?
EDIT
Please see below
Java Build Path
Binary Build
Class Path
Manifest
Project Jar File
Error
Line 287 - PDFFile pdffile = new PDFFile(buf);
Everything seems to be in place to me. But I must be missing something
Upvotes: 2
Views: 4478
Reputation: 1391
I could not get the above to work. So I created a plug-in using the external jar file. Added the plug-in the required Plug-ins. Exported the new plug-in jar to my target platform.
This has me up and running.
Upvotes: 0
Reputation: 5250
To solve this issue, you can do one of these.
Make sure that external jar is part of exported jar as explained by Chris.
You can use classpath option to add third party jar which running the class.
Upvotes: 0
Reputation: 16392
I believe that you have to update the build definition in the plugin.xml editor to specify that the jar dependency be included in the exported jar:
By default, only classes and resource files in the source folder(s) are included automatically in the build.
Upvotes: 1