When compile and run using eclipse there is no problem , but when I exported as jar with these setting , i got Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener .
The jar exporter didn’t export my extended jar library?


This sentence from the Exceptions JavaDoc helps to understand what went wrong:
You’ve build the application on eclipse with no errors. So the classpath definition inside eclipse was good enough to compile all classes.
Now you export it, run it out of eclipse and encounter that error. The exported application does not use the eclipse projects classpath definition any more. And the currrent one does not include the library which contains the
gnu.io.SerialPortEventListener.The general solution is: fix the classpath problems for the exported jar.