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?
Answers were Sorted based on User's Feedback
Answer / hardik
In most gnral mistech one make is file name and class name
error than this error accurs mostly , or no classname found
when the environment variable or class path is not given
Java compilor search for the path given to the class name
(ig in cmd javac searching in same folder if we have given
path = ./) .class files than java command searchs for the
same path but if it is not given to the same this error
comes. and java compilor never looks for the class file it
looks for the the .java file and it creates .class file
which than looked by java run time environment.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / 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 |
What do you mean by pointer value and address?
explain about method overloading and method overriding with difficult examples
What are the differences between string, stringbuffer and stringbuilder?
why we import both packages java.awt.*; and java.awt.event.*; as java.awt.*; can import all classes na. then what is the need of importing java.awt.event.*; ?
what is the diffrence between class and object?
What are JVM.JRE, J2EE, JNI?
How to use string tokenizer class.
What is byte data type?
what is the purpose of using rmisecuritymanager in rmi?
In method overloading ,if i change the return type to Long instead of INT,is the program execute
How you can create a radio buttion using Checkbox class?
How can you make a class serializable in java?