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

What is the use of :: in java?

570


Explain public static void main(string args[]).

564


What does java se mean?

586


What is javac used for?

512


What is the purpose class.forname method?

556






What does 0 mean in boolean?

542


Can finally block be used without a catch?

543


Can singleton class be serialized?

511


Is string is a keyword in java?

545


How many bytes is a string?

558


What is re-factoring in software?

574


What is assembly condition codes?

558


How do you define a set in java?

508


Why arraylist is not synchronized in java example?

467


What is Java Package and which package is imported by default?

592