Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Including an external JAR with plug-in


The JDT allows you to put external jars on your build path, but Eclipse
requires that all jars that you utilize be contained in your plugin's
folder.  Your plugin.xml also must define this jar in a runtime tag (see
example below).  If you envision sharing a particular jar among many
plugins, you can create one plugin that declares (& exports) the jar, and
then other plugins can require that plugin (rather than the jar directly).

It's 5:38pm on Dec. 20th and I'm the last one in my office until next year.
I hope I've been clear :P.


      <library name="MyJar.jar">
            <export name="*"/>

                      "Donovan, Bob"                                                                                                             
                      <bob.donovan@eds         To:      <pde-dev@xxxxxxxxxxx>                                                                    
                      .com>                    cc:                                                                                               
                      Sent by:                 Subject: [pde-dev] Including an external JAR with plug-in                                         
                      12/20/2002 05:09                                                                                                           
                      Please respond                                                                                                             
                      to pde-dev                                                                                                                 


I am building a plug-in that references classes in an external JAR. I have
included the external JAR in the buildpath of the preferences dialog. But
when I run the runtime workspace, the plug-in fails to load with the
following error:

"Problems Showing View"
An error has occured while restoring the view.

I have isolated it to the fact that it breaks when the view trys to
reference a java class that is using classes in the external jar.

I am not sure what the problem is, but I am assuming that I need to somehow
get my external jar files included with the runtime workspace, or added to
the classpath for the runtime workspace. The problem is that I can't find
anywhere to do this? I guess I am not doing the correct thing?

Does anyone know what I need to do?

Thanks, Bob

Back to the top