|Problem with JUnit4 and Eclipse [message #1171668]
||Tue, 05 November 2013 11:55
| Nick Bar
Registered: November 2013
Hello all! |
I am trying (unsuccessfully) to get JUnit to work. I have a Java project with just one class (called MyClass) that has only one function named multiply (i.e. simple stuff).
I create a test class to do the unit testing (Right Click -> New -> JUnitTestCase etc ... ), a test class is automatically created however when I "Run As -> Junit Test" I always get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/junit/runner/RemoteTestRunner
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
at java.security.AccessController.doPrivileged(Native Method)
I know this must be something trivial and has to do with library dependencies, however JUnit4 is already included in the build path (Project -> Properties -> Java Build Path -> Libraries)!
What I have tried so far (based on solutions I found on Google) :
- Double-checking that JUnit4 is in the build path.
- Manually adding JUnit4 to build path
- Cleaning and rebuilding my project
- Use of JUnit3 stead of JUnit4
- Go to Order and Export (Project -> Java Build Path -> Order and Export) and check JUnit4.
- Re-installing Eclipse(!)
No matter what I try, I always get the same error. Any ideas?
P.S. I don't think it matters, but I run Eclipse IDE for Java Developers on a Mac (Maverick).
Powered by FUDForum
. Page generated in 0.03675 seconds