1

I want to make Cytoscape Simple App(It is like a Plug in Program).

So I should make a .jar file, and install it in Cytoscape Program.

My problem is the following:

I'll show you 2 cases.

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).

  • Case 1

    A extends B

    C instance is created at A

    C extends D

    E instance is created at C

    E extends F

Result:

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
  • Case 2

    A extends B

    C instance is created at A

    C extends D

    F instance is created at C

Result:

Good, no errors!

Following is E extends F

public final class SampleListener extends Listener {
    //nothing
}
vefthym
  • 7,422
  • 6
  • 32
  • 58
DAESEONG KIM
  • 371
  • 3
  • 12

1 Answers1

0

This error

Caused by: java.lang.NoClassDefFoundError: com/leapmotion/leap/Listener at CytoscapeLeapMotionApp.(CytoscapeLeapMotionApp.java:9) ... 21 more

suggests that when CytoscapeLeapMotionApp is run, the type com.leapmotion.leap.Listener is not on the classpath.

You have indicated that this type is within a jar file named 2.jar so this needs to be added to the classpath before you retry.

JamesB
  • 7,774
  • 2
  • 22
  • 21