|Cannot load classes when running a plug-in [message #588191]
||Tue, 13 January 2009 07:46
Registered: July 2009
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
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
I don't know what to do.
I'll be happy to get some ideas.
Powered by FUDForum
. Page generated in 0.01379 seconds