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

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:Loading dependency at runtime
Next Topic:Format of target platform definition?
Goto Forum:

Current Time: Fri Apr 20 10:51:20 GMT 2018

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

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