【问题标题】:install4j - jre.bundle is not updatedinstall4j - jre.bundle 未更新
【发布时间】:2015-07-29 19:21:46
【问题描述】:

我正在使用 install4j 5.1.15,并且我有适用于 Mac OS 和 Windows 64 位的安装程序以及捆绑的 JRE 7。我的应用程序的安装/更新可以正常使用此安装程序。

现在我需要将捆绑的 JRE(安装在 /Applications/MyApp/.install4j/jre.bundle 中)从 7 升级到 8。我使用 JRE 8 构建了新的安装程序(并在我的更新操作的配置中选中了 Update bundled JRE 选项)。

问题: 全新安装时安装了 JRE 8,但是当我尝试更新现有安装时,现有 JRE 7 未更新到 JRE 8。其他文件已正确更新。 Mac OS 和 64 位 Windows 上的行为相同。此外,我在日志文件中看不到任何警告/错误。这是一个错误还是我错过了什么?

编辑:installation.log 中没有关于更新 JRE 文件的消息,即使 updateBundledJre: true:

[INFO] com.install4j.runtime.beans.actions.InstallFilesAction [ID 767]: Execute action
       Property sizeCalculatorScript: null
       Property installRuntime: false
       Property saveDownloadedFiles: false
       Property updateBundledJre: true
       Property checkFreeSpace: true
       Property validateApplicationId: false
       Property delay: false
       Property triggerReboot: true
       Property directoryResolverScript: null
       Property fileFilterScript: null
       Property showFileNames: true
       Property rollbackSupported: true
Install file: /Applications/MyApp/my-file.tmp; size: 245 bytes; exists: true
Execute action successful after 5650 ms

【问题讨论】:

  • 您可以查看文件 .install4j/installation.log 看它是否尝试安装 JRE 8 文件
  • 感谢 Ingo 的评论。我附上了installation.log。

标签: java macos install4j


【解决方案1】:

我尝试将installRuntime 属性的值更改为true,它解决了我的问题。在更新过程中,当前 JRE 被移动到文件夹 /Applications/MyApp/.install4j/__i4j_jre_backup,并且新的 JRE 已正确安装。它现在适用于 Mac OS 和 Windows。

installation.log:

[INFO] com.install4j.runtime.beans.actions.InstallFilesAction [ID 767]: Execute action
       Property sizeCalculatorScript: null
       Property installRuntime: true
       Property saveDownloadedFiles: false
       Property updateBundledJre: true
       Property checkFreeSpace: true
       Property validateApplicationId: false
       Property delay: false
       Property triggerReboot: true
       Property directoryResolverScript: null
       Property fileFilterScript: null
       Property showFileNames: true
       Property rollbackSupported: true
       Install file: 
Install file: /Applications/MyApp/my-file.tmp; size: 245 bytes; exists: true
Install file: /Applications/MyApp/.install4j/jre.bundle/Contents/Home/jre/bin/java; size: 103632 bytes; exists: false
       File options set to: [fileTime: Wed Jul 29 12:34:46 CEST 2015, mode: 644, overwriteMode: Always ask except for update, shared: false, uninstallMode: If created, but not for update, delayIfNecessary: false]
...
Execute action successful after 12345 ms

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多