Cytoscape Simple App을 만들고 싶습니다 (플러그인 프로그램과 같습니다).ClassNotFoundException & NoClassDefFoundError (이유는 무엇입니까?)
그래서 .jar
파일을 만들어 Cytoscape 프로그램에 설치해야합니다.
내 문제는 다음과 같습니다.
두 가지 사례를 보여 드리겠습니다.
There are 6 classes(A,B,C,D,E,F), and 2 .jar file(that represent other API)
A (CytoscapeLeapMotionApp) is the main class(actually it doesn't include main method, but it is the first class run when App is installed).
C,E are classes that I made.
B,D are in 1.jar.
F(Listener) is in 2.jar(leap).
사례 1
A는
C 인스턴스가
C로 만든 B 연장 D 연장
E 인스턴스 C
에서 만들어 전자 연장 F는
는 결과 :
Caused by: java.lang.NoClassDefFoundError: com/leapmotion/leap/Listener at
CytoscapeLeapMotionApp.<init>(CytoscapeLeapMotionApp.java:9) ... 21
more
Caused by: java.lang.ClassNotFoundException:
com.leapmotion.leap.Listener at
java.net.URLClassLoader$1.run(URLClassLoader.java:202) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:190) at
java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 22 more
케이스 A는
C 인스턴스가
C로 만든 B에게 확장 2
는 D
,174,515 확장F 인스턴스는 C
에서 만든 결과 :
좋은, 오류없이!
다음은 E는 F
public final class SampleListener extends Listener {
//nothing
}
리스너 – ray
의 네임 스페이스로 전체 클래스 이름을 지정해보십시오. 어떻게 응용 프로그램을 실행하고 있습니까? IDE 내에서 또는 명령 줄을 통해? – JamesB
@ray 죄송합니다. 초보자인데, 네임 스페이스가 무엇을 의미하는지 모르겠습니다. : –