本文介绍了通过install4j 6.1.4和JRE 1.8.0_121获取java.lang.UnsatisfiedLinkError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已将次要升级安装程序升级到最新的JRE/install4j,并且在尝试使用install4j API时开始出现以下错误:

We upgraded to latest JRE/install4j for our minor upgrade installer, and we started getting the following error when we try to use install4j API:

2017-02-17 19:29:42 SEVERE:  #{14} [StandardContext.loadOnStartup] Servlet [ConfigServlet] in web application [] threw load() exception
java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
    at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
    at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
    at com.install4j.runtime.installer.platform.win32.Misc.<clinit>(Unknown Source)
    at com.install4j.api.windows.WinEnvVars.getenv(Unknown Source)
    at com.install4j.runtime.installer.helper.InstallerUtil.is64BitWindows(Unknown Source)
    at com.install4j.api.Util.is64BitWindows(Unknown Source)
...

当我们尝试启动卸载程序时,我们会遇到相同的错误:

We get the same error when we try to launch the uninstaller:

Exception:

java.lang.UnsatisfiedLinkError: com.install4j.runtime.installer.platform.win32.Common.setWindows95(Z)V
    at com.install4j.runtime.installer.platform.win32.Common.setWindows95(Native Method)
    at com.install4j.runtime.installer.platform.win32.Common.init(Unknown Source)
    at com.install4j.runtime.installer.platform.win32.Win32UserInfo.<clinit>(Unknown Source)
    at com.install4j.runtime.installer.platform.UserInfo.isAdminGroup(Unknown Source)
    at com.install4j.api.Util.isAdminGroup(Unknown Source)
    at com.install4j.runtime.installer.InstallerVariables.initAdminRights(Unknown Source)
    at com.install4j.runtime.installer.InstallerVariables.initCommandLine(Unknown Source)
    at com.install4j.runtime.installer.Uninstaller.getScreenExecutor(Unknown Source)
    at com.install4j.runtime.installer.Uninstaller.runInProcess(Unknown Source)
    at com.install4j.runtime.installer.Uninstaller.main(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
    at com.exe4j.runtime.WinLauncher.main(Unknown Source)
    at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)

是什么原因造成的?

推荐答案

API JAR文件(i4jruntime.jar)和本机库(i4jinst.dll)之间不匹配.看来您的类路径中有i4jruntime.jar的旧版本.

There is a mismatch between the API JAR file (i4jruntime.jar) and the native library (i4jinst.dll). It seems that you have an old version of i4jruntime.jar in your classpath.

这篇关于通过install4j 6.1.4和JRE 1.8.0_121获取java.lang.UnsatisfiedLinkError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 05:12