线程“AWT-EventQueue-0”中的异常java.lang.NoSuchMethodError:setControlKeepAliveTimeout(J)V

时间:2014-01-08 06:26:52

标签: java eclipse

我为我的项目创建了一个可运行的jar,当我尝试执行它时,我得到异常,但是从eclipse开始它正在执行

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: com.FTP.setControlKeepAliveTimeout(J)V
    at com.FTP.<init>(FTP.java:64)
    at com.build.Build.GetFtp(Build.java:71)
    at com.build.MainFile.step1(MainFile.java:79)
    at com.build.ui.ScreenL.jButton2MouseClicked(ScreenL.java:240)
    at com.build.ui.ScreenL.access$1(ScreenL.java:215)
    at cm21.build.ui.ScreenL$2.mouseClicked(ScreenL.java:88)
    at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
    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.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(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)

我发现setControlKeepAliveTimeout是来自项目中包含的Jar之一的方法。我还没有解决这个问题。

1 个答案:

答案 0 :(得分:1)

您的操作系统环境中的com.FTP库版本与Eclipse环境中的版本不同。确保classpath在两个环境中引用相同的JAR。