使用install4j 6.1.4和JRE 1.8.0_121获取java.lang.UnsatisfiedLinkError

时间:2017-02-17 14:13:01

标签: install4j

我们为次要升级安装程序升级到最新的JRE / install4j,当我们尝试使用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)
...

我们尝试启动卸载程序时遇到同样的错误:

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)

造成这种情况的原因是什么?

1 个答案:

答案 0 :(得分:0)

API JAR文件(i4jruntime.jar)与本机库(i4jinst.dll)不匹配。您的类路径中似乎有旧版本的i4jruntime.jar。