본문 바로가기

Problem

NoClassDefFoundError

http://stackoverflow.com/questions/34413/why-am-i-getting-a-noclassdeffounderror-in-java 참조



정의

  1. java.lang.ClassNotFoundException This exception indicates that the class was not found on the classpath. This indicates that we were trying to load the class definition, and the class did not exist on the classpath.

  2. java.lang.NoClassDefFoundError This exception indicates that the JVM looked in its internal class definition data structure for the definition of a class and did not find it. This is different than saying that it could not be loaded from the classpath. Usually this indicates that we previously attempted to load a class from the classpath, but it failed for some reason - now we're trying to use the class again (and thus need to load it, since it failed last time), but we're not even going to try to load it, because we failed loading it earlier (and reasonably suspect that we would fail again). The earlier failure could be a ClassNotFoundException or an ExceptionInInitializerError (indicating a failure in the static initialization block) or any number of other problems. The point is, a NoClassDefFoundError is not necessarily a classpath problem.


요약 : ClassNotFoundException 은 Classpath 에 클래스가 없다는 거고
    NoClassDefFoundError 는 클래스를 클래스 패스에 올리는데 문제가 발생해서 에러가 난 것이다.
    ClassNotFoundException 일 수 있고 초기화하다 난 에러일수 있고 그 외 몇 가지 다른 이유일 수 있다.



'Problem' 카테고리의 다른 글

자원 대기중 교착상태가 검출되었습니다.  (0) 2016.08.19