Select Page

java.lang.ClassNotFound and ClassNotDefFoundError are different but ..

 java.lang.ClassNotFound and ClassNotDefFoundError are different but what if my classes are in classpath?

 Remember:

  • ClassNotDefFoundError is thrown if a class definition of the hierarchy is not located by the classloader
  • ClassNotFound if the file or class can not be found in classpath. Remember only some servletrunner can open jar files, so having jar files in a directory without having them explicitely in classpath do not help much. You must have the name of jar file in CPath.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments

Categories

0
Would love your thoughts, please comment.x
()
x