从izpack运行install.jar给我没有这样的方法异常

时间:2012-07-24 17:01:06

标签: java izpack

使用Izpack 5.0.0-beta10和compiler.bat

构建了一个install.jar

当我尝试使用java -jar install.jar运行它时,我得到了

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: com.izforge.izpack.util.file.FileUtils.close(Ljava/io/Closeable;)V
        at com.izforge.izpack.installer.container.impl.EventFiller.readObject(EventFiller.java:154)
        at com.izforge.izpack.installer.container.impl.EventFiller.loadCustomData(EventFiller.java:62)
        at com.izforge.izpack.installer.container.impl.InstallerContainer.fillContainer(InstallerContainer.java:98)
        at com.izforge.izpack.core.container.AbstractContainer.initBindings(AbstractContainer.java:25)
        at com.izforge.izpack.installer.bootstrap.InstallerGui$1.run(InstallerGui.java:47)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(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.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)

这在Windows上我把JAVA_HOME设置为Java 7 jdk,从命令提示符输入java -version也给了我Java 7

我可以使用Izpack 4.3.5构建和运行相同的install.xml没问题。

1 个答案:

答案 0 :(得分:0)

您可能依赖于与安装程序不同的izpack-util版本。

无论如何,您运行的是旧版本的5.0。我建议从repository

下载最新的快照