why should we get the following error ?
Exception in main method NoClassDefFoundError:classname

could anyone give the detail clarification on how java
compiler can look for .class file?

Answer Posted / narsimharaju

When we compile our java .class file then it is not available then we will get a runtime exception saying
NoClassDefFoundError:classname.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is string builder not thread safe?

589


Is alive and join method in java?

536


What is an argument in java?

505


How does linkedlist work in java?

503


How are this() and super() used with constructors in java programming?

566






What restrictions are placed on method overriding in java programming?

536


Tell me about your ability to work under pressure

1765


Explain thread life cycle in java?

587


Explain the transient field modifier?

560


Why is java logo a cup of coffee?

618


What are the limitations of procedural programming approach?

523


What is the difference between member variables initialization and assignment in a constructor?

655


In how many ways we can create threads in java?

628


What is the use of a copy constructor?

570


What is flush buffer?

516