Here are the steps that I have completed.
- Downloaded PDFRenderer.jar
- Created lib folder in my Eclipse Plug-In Project
- Copied the jar to the lib folder
- Right Click Build Path -> Configure Build Path
- Libraries Tab -> Add JARs -> Selected lib/PDFRenderder.jar file
Runtime Tab in MANIFEST.MF
- Click Add -> Selected lib/PDFRenderder.jar
- Click New -> New Library Name -> entered .
- Built the Project – No Errors
Right Click Project
- Export -> Deployable plug-ins and fragments -> Pick my plugin project name
- Copy exported Project plug-in to my Teamcenter/plug-ins dir
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
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.