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 8415475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:27:29+00:00 2026-06-10T01:27:29+00:00

I am having problems importing an external .class file into an eclipse project. I

  • 0

I am having problems importing an external .class file into an eclipse project. I have read through most of the related questions and none of those answer have worked for me. Here is the following code for my project:

import java.lang.management.ManagementFactory;
import java.lang.management.ThreadMXBean;
import timing.Timing;

public class Test {
    public static void main(String[] args){
        int seed = 518406;
        long begin = 0;
        long end = 0;
        ThreadMXBean bean = ManagementFactory.getThreadMXBean();

        for(int i = 1; i < 10000; i=i*2){
            begin = bean.getCurrentThreadCpuTime();
            Timing.trial(i, seed);
            end = bean.getCurrentThreadCpuTime();
            System.out.println(i + ": " + (end - begin) + "ns");
        }
    }

}

I have imported by placing the Timing.class file in at /lib/timing/Timing.class and I have added the lib folder as a Class Folder to the build path. In the Order and Export tab of the build path window, I have moved the lib folder to the top and have it checked.

When running the code above I get the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: Timing
        at Test.main(Test.java:14)
Caused by: java.lang.ClassNotFoundException: Timing
    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)
    ... 1 more

Can anybody help me figure out what is going wrong?

  • 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-10T01:27:30+00:00Added an answer on June 10, 2026 at 1:27 am
    1. In stacktrace this line looks strange

      Exception in thread “main” java.lang.NoClassDefFoundError: Timing

    It seems like java search Timing in default package not in timing package. Check this moment.

    2 How do you run this code? From Eclipse?
    If so, check Eclipse run configuration for this launch. May be you add class folder to Build path but don’t add it launch class path.

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

Sidebar

Related Questions

Im having problems with a method in a class file: public static function getPageLeft($pid)
I'm having problems using ProcessBuilder to run a class in my project. My code:
I am having problems importing Python's random module using Eclipse. It creates a red
I am having problems importing models between my apps in my current django project.
I'm having huge problems with my populate.rake file - after importing my existing file
I am having some problem in importing a .csv file into a sqlite table.
Im having problems with classpaths. I have used them before with import but I'm
im having problems starting a codeigniter project, the problem is that when i do
I'm having problem importing a csv file with <br /> contents in it to
I'm trying to transition to eclipse+pydev but am having a problem importing projects under

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.