dynamically updating plugin classpath [message #334888] |
Fri, 06 March 2009 13:57  |
Eclipse User |
|
|
|
Is it possible to modify the classpath of a plugin dynamically.
I make use of some external jar files in my application, for which, I make
use of the
external:$LOCATION$/xxx.jar
where $LOCATION is an environment variable, which works fine.
I now have a situation where the user can specify a diffrent location for
the jar file while using the application. I need to figure out how to
replace the old jar with the new in the plgin CP.
Is there an api to access the manifest file and update the classpath
entry? If that is possible, maybe I could reload the plugin and the new
classpath would be effective.
Any suggestions?
Thanks
Jeevan
|
|
|
|
|
|
Re: dynamically updating plugin classpath [message #334934 is a reply to message #334900] |
Tue, 10 March 2009 13:32   |
Eclipse User |
|
|
|
I tried the solution, but, Eclipse does not let the user change system
properties programmatically.
Paul Webster wrote:
> jeevan wrote:
>> The way it is now, I can change the environment variable and it works
>> fine (but, I need to exit the application). I am trying to do this
>> without exiting the application, the reason why I was looking to update
>> the manifest file.
>> With you solution, I still need to exit the application.
> why? If you uninstall the bundle it's gone ... then you re-install the
> bundle with the updated variable. I would imagine if you are using
> system properties, uninstalling, change the property, and re-installing
> would allow the system property to be read a second time.
> Nothing in my post or example said "and restart the workbench" :-)
> PW
|
|
|
|
Powered by
FUDForum. Page generated in 0.03859 seconds