Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Cannot load classes when running a plug-in

Hello, everybody.
I'm a student and new in eclipse and I have a problem that I'm dealing with
for more then a week but haven't resolved yet:
I'm developing a plugin(in java) - an expension to the eclipse IDE - that
one of its features is running a unit test and generate a report of its
results.
I've added a button that let the user to choose the wanted file and to run
it with JUnit.core.run.
When I run the plugin as eclipse application the fileChooser returns the
file full path.
JUnit.core.run suppose to get a Class, so I use Class.forName() to load the
class (I generate a class name from the full path). 
The problem is that Class.forName() is looking for the class in the wrong
workspace. It looks for the class in my workspace (the plugin development
workspace) and no in the user's workspace (run time workspace) and it throws
an exception: class not found. 
When I choose a unit test from my workspace, it run it with no exception.
In addition to the problem that it doesn't find the class, the unit test
must run in its own workspace because it uses the classes of the current
project.
I don't know what to do.
I'll be happy to get some ideas.
Thanks Hadas

-- 
View this message in context: http://www.nabble.com/Cannot-load-classes-when-running-a-plug-in-tp21430684p21430684.html
Sent from the Eclipse PDE - General mailing list archive at Nabble.com.



Back to the top