Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Adding PDFRenderder.jar to my Plug-In Project - Runtime Error
Adding PDFRenderder.jar to my Plug-In Project - Runtime Error [message #976678] Thu, 08 November 2012 19:21 Go to next message
James Teater is currently offline James Teater
Messages: 17
Registered: July 2011
Junior Member
I am adding PDFRenderer.jar to my Plug-in project.
Here are the steps I used.

1. Downloaded PDFRenderer.jar
2. Created folder named lib in my Eclipse Plug-In Project
3. Copied PDFRenderer.jar to the lib folder
4. Went to Build Path -> Configure Build Path ->
Libraries Tab -> Add JARs -> Selected lib/PDFRenderder.jar file
5. Went to Runtime Tab in MANIFEST.MF
6. Click Add -> Selected lib/PDFRenderder.jar
7. Click New -> New Library Name -> entered .
8. Built the Project - No Errors

9. Export -> Deployable plug-ins and fragments -> Pick my plugin project name
created Project jar file in my Project Plug-in dir

10. Copied Project plug-in to my Teamcenter/plug-ins dir (Main Application)
11. When my application tries to a PDFRenderer command such as
PDFFile pdffile = new PDFFile(buf); - I get following runtime error.

org.eclipse.core.runtime - org.eclipse.ui - 0 - Unhandled event loop exception java.lang.NoClassDefFoundError: com/sun/pdfview/PDFFile

Is it a problem that I am trying to use a class from PDFRenderer.jar inside my Project plug-in?
Re: Adding PDFRenderder.jar to my Plug-In Project - Runtime Error [message #977413 is a reply to message #976678] Fri, 09 November 2012 09:07 Go to previous messageGo to next message
sumit singh is currently offline sumit singh
Messages: 131
Registered: October 2012
Location: Bangalore
Senior Member

Do same steps till Step No:7
Then Click on add button in Exported package section from your Runtime Tab in MANIFEST.MF (See the attachment)
Then add all the packages.
After that it will work for you. try it.

And one more thing you can do . rather than adding jar in lib folder you can create plugin with that jar.
And add it to your plugin dependency . It should be better way.
1. click on file-> New -> Other
2. Click on plugin development , and choose plug-in from existing Jar archive (see plugin.png)
3. select your external jar , give some name of that plugin
4. add that plugin as dependency in your plugin.
5.done
  • Attachment: How to use.png
    (Size: 39.98KB, Downloaded 129 times)
  • Attachment: plugin.png
    (Size: 48.95KB, Downloaded 122 times)

[Updated on: Mon, 12 November 2012 07:04]

Report message to a moderator

Re: Adding PDFRenderder.jar to my Plug-In Project - Runtime Error [message #977757 is a reply to message #977413] Fri, 09 November 2012 14:52 Go to previous messageGo to next message
James Teater is currently offline James Teater
Messages: 17
Registered: July 2011
Junior Member
I really would like to do it as a plug-in and then add it as a required plug-in.

But when I create a plug-in from the PDF.jar and add it as a required plug-in to my main project.

When I close the PDF plug-in project in eclipse , I can no longer build the main project, it errors about missing the PDF plug-in.

Is there a way to create the PDF plug-in, add it to my project either as a required plug-in or some way I don't know about?

Then be able to close the pdf plug-in project without the errors in my project.
Then when I export the main project jar, the pdf plug-in will be wrapped up in the project jar?

My project is basically a add on application to a package called TeamCenter. I really don't want to have to push the pdf.jar to all my client machines.
Re: Adding PDFRenderder.jar to my Plug-In Project - Runtime Error [message #981118 is a reply to message #977757] Mon, 12 November 2012 07:00 Go to previous message
sumit singh is currently offline sumit singh
Messages: 131
Registered: October 2012
Location: Bangalore
Senior Member

Did you tried 1st one "Exporting package's" from above in my answer .

And answer of your question "close the pdf plug-in project without the errors in my project".
I think this can't be possible because your project required PDF.jar but if you'll close that plugin (created from PDF.jar) that how you will get that dependency.

I really don't want to have to push the pdf.jar to all my client machines.
Actually I doesn't fully understand that means , you have a project that required PDF.jar and you don't want to push it to your client.
than how your project will work..?
In my understanding if your project required PDF.jar then you have 2 option
1. Create plugin from PDF.jar and add as dependency to your project.
2. Add PDF.jar in to your lib folder in your project and export all the class for run time as i mention above(see screenshot).

[Updated on: Mon, 12 November 2012 07:03]

Report message to a moderator

Previous Topic:Open external file into rcp
Next Topic:run multiple instances of "eclipse 4 application project
Goto Forum:
  


Current Time: Thu Oct 30 15:51:19 GMT 2014

Powered by FUDForum. Page generated in 0.01721 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software