Home » Eclipse Projects » Eclipse Platform » Howto add an external jar dynamically to an eclipse plugin's classpath during runtime
| | | | | | | | | | | | | |
Re: Howto add an external jar dynamically to an eclipse plugin's classpath during runtime [message #642619 is a reply to message #642451] |
Thu, 02 December 2010 02:10 |
Dan Messages: 9 Registered: November 2010 |
Junior Member |
|
|
Ok, that makes alot of sense, though it seems a bit strange that the build even works when the external:${variable} form is used. So, I tried using the following:
extra.. = ${env.JBOSS_HOME}/client/commons-logging.jar,\
${env.JBOSS_HOME}/client/jboss-common-core.jar,\
etc...
No go. Appears that I need to set:
<property environment="env"/>
in build.xml for this to work. But, build.xml is generated as part of the export process, so I don't know where to set it. Am I doing this correctly? Is there something else I should be modifying?
In regards to my tweak, wouldn't the Activator be called, and thus the variable set, before OSGI tries to resolve a class contained in the bundle? Theoretically, is there anytime this wouldn't occur?
Thanks again for all of your thoughts and help.
Dan
|
|
| |
Re: Howto add an external jar dynamically to an eclipse plugin's classpath during runtime [message #643432 is a reply to message #643317] |
Mon, 06 December 2010 20:09 |
Dan Messages: 9 Registered: November 2010 |
Junior Member |
|
|
Thanks Paul, but I'm still having problems. Sorry to be such a problem child.
> 1) get it compiling in your workspace. For that, the extra "libs" you
> need to compile should work.
I'm not sure what you mean here. How do I refer to the extra libs?
Should putting the following in my build.properties file of the library plugin do it?
extra.. = ${env.JBOSS_HOME}/client/commons-logging.jar,\
${env.JBOSS_HOME}/client/jboss-common-core.jar,\
etc...
Currently, I get the main plugin to compile by putting the JBoss libraries on the Java Build Path.
> 2) to get it running, you can add -DJBOSS_HOME to your launch config so
> that the bundle manifest can find the libs when using $JBOSS_HOME$
Yes, this works fine.
> 3) For building, I use PDE headless build. That probably means
> specifying extra libs in the pde build.properties somewhere.
I haven't tried the PDE headless build before. Any recommended reading for instructions? I'd rather build from the eclipse UI if possible.
> I'm not sure what "export" you are using. Deploying a product from a
> ..product file? To get that to work, you'd probably have to reconcile
> steps 1 and 2 somehow.
I've been using File->Export->Deployable plug-ins and fragments to build and deploy my plugins. Seems to work fine except for interpreting the variable for the library location in extra.. = ${env.JBOSS_HOME}/...
Any help in clarifying these issues would be greatly appreciated.
|
|
| |
Goto Forum:
Current Time: Thu Sep 26 11:57:30 GMT 2024
Powered by FUDForum. Page generated in 0.04188 seconds
|