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

Can we have return statement in finally clause? What will happen?

729


How hashmap increases its size in java?

702


What environment variables do I need to set on my machine in order to be able to run java programs?

786


Can you pass by reference in java?

724


what is daemon thread and which method is used to create the daemon thread? : Java thread

734


What is the use of protected in java?

736


Can an object be null?

733


Explain about anonymous inner classes ?

800


How can a gui component handle its own events in java programming?

744


What is the functionability stubs and skeletons?

892


What is difference between static and final?

752


Difference between final and effectively final ? Why is effectively final even required ?

751


What is a generic data type?

736


How variables are stored in memory?

714


what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread

893