Skip to main content



      Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How add a resource to a plugin's classpath dynamically
How add a resource to a plugin's classpath dynamically [message #990526] Wed, 12 December 2012 17:03 Go to next message
Eclipse UserFriend
Hi All

I have a scenario, where a I need to add a file to my plugins' classpath dynamically. Here are more details:

I have a plugin which when installed allows user to right click on an .xmi file and generate another file in the same directory as .xmi file. Now my plugin has to load this generated file using PDE's default resource manager(which loads resources from its classpath).

So, I have to update this classpath with the directory in which user generates this file.

I have already looked through a lot of documentation but couldn't find any feasible solution to this problem.

Could you please help me to resolve this problem.

Thanks in advance.
Re: How add a resource to a plugin's classpath dynamically [message #990677 is a reply to message #990526] Thu, 13 December 2012 13:06 Go to previous message
Eclipse UserFriend
The plug-in classpath created by PDE is calculated from the dependencies specified in manifest.mf (require bundle, import package). If you only care about project dependencies (things that OSGi will not know about when launched) you can use JDT to add to the classpath. To add OSGi dependencies you must modify the manifest mf (see org.eclipse.pde.core.project for an API).

There are other ways of dynamically changing the classpath, but I am not familiar with the details. Here is a bug that we are considering to support equinox adapter hooks:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=363733
Previous Topic:Runtime Error
Next Topic:Unable to export deployable feature
Goto Forum:
  


Current Time: Sun Jul 13 16:03:25 EDT 2025

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

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

Back to the top