Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JUnit Problem
JUnit Problem [message #544481] Fri, 02 July 2010 19:30 Go to next message
Lafare  is currently offline Lafare Friend
Messages: 2
Registered: July 2010
Junior Member
Hello,

I'm very new to Java/Eclipse.
I've installed the Eclipse Helios version on my PC/Windows.
I've created a very basic project HelloWorld that works fine.

I'm trying to create a JUnit test using the wizard and when I launch the test, I get the following error. (I tried JUnit 3 and 4, same result):

java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/junit/runner/RemoteTestRunner
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"

I don't know how to tackle this error? Any help to correct this problem would be appreciated.

Thank you by advance
Re: JUnit Problem [message #544488 is a reply to message #544481] Fri, 02 July 2010 20:24 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 7/2/2010 1:30 PM, Lafare wrote:
> Hello,
>
> I'm very new to Java/Eclipse.
> I've installed the Eclipse Helios version on my PC/Windows.
> I've created a very basic project HelloWorld that works fine.
>
> I'm trying to create a JUnit test using the wizard and when I launch the
> test, I get the following error. (I tried JUnit 3 and 4, same result):
>
> java.lang.NoClassDefFoundError:
> org/eclipse/jdt/internal/junit/runner/RemoteTestRunner
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
> [snip]

1. Right-click on your project and choose Build Path -> Configure Build
Path.

2. Click on the Libraries tab.

3. Click Add Library.

4. Click JUnit, then choose either JUnit 3 or 4 depending on which you
want to use (if you're going to use Java 5 or 1.6, I'd suggest JUnit 4).

5. Right-click the JUnit test you wanted to run and choose Run As ->
JUnit Test.

You shouldn't be missing this symbol now, I think.

Russ Bateman
Re: JUnit Problem [message #544498 is a reply to message #544488] Fri, 02 July 2010 22:24 Go to previous messageGo to next message
Lafare  is currently offline Lafare Friend
Messages: 2
Registered: July 2010
Junior Member
The correct JUnit lib was automatically included by the wizard.
I tried with both version of JUnit (the correct lib was proposed) but the error remained..

Re: JUnit Problem [message #544633 is a reply to message #544498] Mon, 05 July 2010 07:19 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Lafare wrote:
> The correct JUnit lib was automatically included by the wizard.
> I tried with both version of JUnit (the correct lib was proposed) but
> the error remained..
You need to check the launch configuration.

Dani
Previous Topic:Automatic perspective switch
Next Topic:Custom Editor Keys on Mac OSX
Goto Forum:
  


Current Time: Tue Apr 23 17:12:37 GMT 2024

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

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

Back to the top