Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to dynamically add to a plugin's classpath?
How to dynamically add to a plugin's classpath? [message #635513] Wed, 27 October 2010 07:35
Milos  is currently offline Milos Friend
Messages: 1
Registered: October 2010
Junior Member
Hi,

I need help with wiritng an Eclipse plugin. I've made a parser that scans .class files, takes annotations out of them and puts them all into an XML file. It's a Java application, with a (basic) GUI. This works if I add the application to an existing Eclipse project - the parser successfully scans all folders, finds all .class files and makes XMLs if needed.

However, I now have to convert it into an Eclipse plugin. I've managed to add the button with the appropriate action command which launches the parser. The parser does find all .class files for the project that is selected in Package Explorer, but ClassLoader always throws a classNotFound exception. I've tried using ClassUtils to get the class, setting "true" to initialize them, but that didn't work.

Basically, I think the problem is that my Eclipse plugin doesn't see classes of Eclipse projects, because they are not in its classpath. Is this correct? How can I do this? Can I take a project's classpath (how?) and dynamically add it to plugin's classpath? Would that work? If not, how can I do this? Can it be done at all?

Thanks in advance.
Previous Topic:how to open a .java file at specified position, dinamically filter a list?
Next Topic:Hierarchical dependent tool creation
Goto Forum:
  


Current Time: Sat Dec 20 05:13:17 GMT 2014

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

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