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

  • SEARCH
  • Home
  • 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 6758977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:52:26+00:00 2026-05-26T13:52:26+00:00

I am using Eclipse 3.5 on Unix machine. I am trying to execute a

  • 0

I am using Eclipse 3.5 on Unix machine. I am trying to execute a simple (dummy) JUnit. I am using JUnit 4 framework for writting Junit Test Case.

Also, I have added Junit 4.10.jar to the project Build path

Here is my Java Class File:
FileStats.java

    package entity;
    public class FileStats {
            public int getAllStats(){
                return 1;
            }
    }

FileStatsTest.java

    package entity;
    import static org.junit.Assert.*;
    import org.junit.Test;
    public class FileStatsTest  {
        @Test
        public void testGetAllStats() {
            assertEquals("its equal",1,new FileStats().getAllStats());
        }
    }

On executing the test case I get the following error:

    Exception in thread "main" java.lang.ClassFormatError: Truncated class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: org.ecli        pse.jdt.internal.junit.runner.RemoteTestRunner.  Program will exit.

I have searched and tried restarting , cleaning build path etc. But could not get it working. Any suggestions what might be missing would be really helpful.

Thanks.

  • 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-05-26T13:52:27+00:00Added an answer on May 26, 2026 at 1:52 pm

    It looks like you have a corrupted installation. Try using a fresh installation of Eclipse, or reinstalling the junit plugin (not the junit jar).

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

Sidebar

Related Questions

Im using Eclipse 3.4, EclipseMe 1.7.9. Im trying to deploy/create package a simple project
I have created a repository on Unix server and trying to connect it using
I am using Eclipse with WindowsBuilder. I have created a small simple project to
I have Eclipse (3.5-32) on my Unix machine. I have installed E-P-I-C updates for
Using Eclipse/Subversive I commanded it to delete a branch of mine. Unfortunately it also
I'm using Eclipse 3.4 and have configured the Java code formatter with all of
I have been using Eclipse as an IDE for a short amount of time
I am using Eclipse v3.5. In previous Eclipse versions i remember if i have
Im using Eclipse with ADT plugin and Sequoia, and Im trying to deploy my
I'm using Eclipse as an IDE for C++ programming. On my system I have

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.