Ich entwickle eine Anwendung in Eclipse und es läuft gut aus innerhalb von Eclipse. Das Problem, das ich habe ist, dass, wenn ich es in eine JAR-Datei exportieren und es über die Befehlszeile ausführen, ich einen NoClassDefFound-Fehler für javax.mail.internet bekomme.java.lang.NoClassDefFoundError in der Befehlszeile
In meinem Projekt Build Pfad und Klassenpfad habe ich die Bibliotheken activation.jar und mail.jar enthalten, die für die Verwendung von javax.mail.internet benötigt werden, und wie ich schon sagte, funktioniert es innerhalb von Eclipse, aber nicht wenn ich exportiere es in ein Glas. Wenn mein Build-Pfad diese Dateien enthält und auch mein Klassenpfad, warum würde das nicht funktionieren? Hier
ist der Fehler-Stack: Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/mai l/internet/InternetAddress at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour ce) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: javax.mail.internet.InternetAddress 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) ... 27 more
ist der Platz in '... javax/mai l/internet ...' ein Copy/Paste oder Ausgabe Interleave Problem? –
Ja, ein Kopier-/Einfüge-Problem. – Graham