   java, eclipse jar problem
  Hello ,i'm kind of new to java. I use eclipse and i imported some jar files with some classes by going to properties -> Add External Jars;The problem is that when i try to use a class from the jar i get the following exception:Exception in thread "main" java.lang.NoClassDefFoundError: nextapp/echo2/app/event/ActionListenerat java.lang.ClassLoader.defineClass1(Native Method)at java.lang.ClassLoader.defineClass(Unknown Source)at java.security.SecureClassLoader.defineClass(Unknown Source)at java.net.URLClassLoader.defineClass(Unknown Source)at java.net.URLClassLoader.access$000(Unknown Source)at java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClassInternal(Unknown Source)at Program.main(Program.java:12)Caused by: java.lang.ClassNotFoundException: nextapp.echo2.app.event.ActionListenerat java.net.URLClassLoader$1.run(Unknown Source)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClassInternal(Unknown Source)... 13 moreThe class is supposed to create a window,i guess that the jar has to import somehow other stuff or something like that,How can i fix this?thansk,Raxvan   
  Does the jar have any associated libraries?  I know when working with the JOGL jars, you also have to point eclipse to the "Native library location" which is a property of the imported jar.   ;  Hello there,are you working with awt ?if that's the case you need to import java.awt.* and also java.awt.event.* if you're using events.As I see in your error log there's some ActionListener, so if it's java native library you're working with I say you should just import those libraries I mentioned.and also one thing, this king of exception 'NoClassDefFoundError', can be thrown also when the name of the public class is not the same as the name of the source file.Check these things out and tell me if that's your problem.   