Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8837483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:44:10+00:00 2026-06-14T09:44:10+00:00

When I try to run a JUnit 4 test i get a NullPointerException in

  • 0

When I try to run a JUnit 4 test i get a NullPointerException in Eclipse.
JUnit3 though works.

I’m trying the following test class:

import static org.junit.Assert.fail;
import org.junit.Test;

public class Test {

    @Test
    public void test() {
        fail("Not yet implemented");
    }

}

Here is the Exception Stack Trace:

java.lang.NullPointerException
    at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localURL(JUnitLaunchConfigurationDelegate.java:420)
    at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.entryString(JUnitLaunchConfigurationDelegate.java:409)
    at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.addEntry(JUnitLaunchConfigurationDelegate.java:396)
    at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate$ClasspathLocalizer.localizeClasspath(JUnitLaunchConfigurationDelegate.java:387)
    at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.getClasspath(JUnitLaunchConfigurationDelegate.java:364)
    at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(JUnitLaunchConfigurationDelegate.java:147)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
    at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
    at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

I’m using OS X Snow Leopard with Java SDK 1.6.0_35 (from Apple).
Both JDK and JUnit 4 are in my build path.
Has the Java Version something to do with the problem ?

UPDATE:

Ok I’m an idiot not thinking of this. I installed Eclipse for C/C++ Developers as I had to do something in C++. But I also used the same instance to develop for Android with the Android SDK plugin and I did some small Java Applications. But I didn’t have the Java Development Tools or the Java EE Developer Tools installed. I installed them now and JUnit 4 works now.

I guess one of this Tools is used for JUnit 4. Strange though that JUnit 3 worked.
Anyway it works now.

Thank you all for your support though.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:44:12+00:00Added an answer on June 14, 2026 at 9:44 am

    Ok I’m an idiot not thinking of this. I installed Eclipse for C/C++ Developers as I had to do something in C++. But I also used the same instance to develop for Android with the Android SDK plugin and I did some small Java Applications. But I didn’t have the Java Development Tools or the Java EE Developer Tools installed. I installed them now and JUnit 4 works now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to run JUNIT test with eclipse and ANT they both are complainen
When I try to run a Solr test case from Eclipse (Right-Click > Run
I'm trying to run Jettys ServletTester in my JUnit test. I created a simple
I am trying to write a unit test for the following class: @Transactional public
I get a java.lang.NoClassDefFoundError: android/util/Log error when I try to run my unit test
Here is my JUnit test class: package com.bynarystudio.tests.storefront; import java.util.List; import org.junit.Assert; import org.junit.Test;
I'm trying to run a test that written by another programmer with JUnit in
I try to run the following raw query in android, it seems not work
I try to run jsf application in myeclipse using jboss web server and following
I try to run the following code: public void Init(Url rootUrl) { var web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.