install4j Extract JAR 文件异常

install4j Extract JAR file exception

对于我们应用程序的卸载程序,我需要从我们的一个 JAR 文件中获取一个版本。所以我创建了一个 ExtractZipFileAction 具有以下选项:

Property mode: 644
Property destinationDirectory: .
Property destinationRoot: Installation directory
Property dirMode: 755
Property fileFilter: 
Property showProgress: false
Property zipFile: OurJarFile-1.0-SNAPSHOT-plugin.jar
Property zipRoot: Installation directory
Property rollbackSupported: true

但是执行会立即取消并显示 ClassCastException(来自错误日志的堆栈跟踪):

[ERROR] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 541]: java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
    at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.zipActions(AbstractZipFileAction.java:89)
    at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.execute(AbstractZipFileAction.java:79)
    at com.install4j.runtime.beans.actions.SystemInstallOrUninstallAction.uninstall(SystemInstallOrUninstallAction.java:35)
    at com.install4j.runtime.installer.ContextImpl.executeAction(ContextImpl.java:1670)
    at com.install4j.runtime.installer.ContextImpl.fetchValue(ContextImpl.java:1659)
    at com.install4j.runtime.installer.ContextImpl.fetchValue(ContextImpl.java:1656)
    at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14)
    at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionWrapper(HelperCommunication.java:367)
    at com.install4j.runtime.installer.helper.comm.HelperCommunication.access0(HelperCommunication.java:33)
    at com.install4j.runtime.installer.helper.comm.HelperCommunication.run(HelperCommunication.java:98)`

请注意,我们在卸载程序中,而不是安装程序中,但异常会抱怨将 UninstallerHelperContextImpl 转换为 InstallerContext。会不会是JAR文件有问题?

我还将操作提升类型设置为 Elevate to maximum available privileges 因为我想提取程序文件夹中安装目录中的文件。

这是一个错误,将在 6.1.5 中修复。请联系 support@ej-technologies.com 以获得修复此问题的构建。