[英]Why would install4j leave some installed files behind when updating existing installation?
我們正在使用 install4j v8.0.11。 正常安裝工作正常,正常卸載也正常工作,方法是按預期刪除C:\Program Files (x86)\App\lib
中的所有文件。
但是,當應用程序已經安裝並且我們運行更新版本的安裝並選擇更新現有安裝時,一些 Java 依賴項(組成CLASSPATH
的lib
文件夾中的文件)在卸載階段不會被刪除。 這會導致具有相同依賴性的多個文件位於CLASSPATH
上,這可能導致 Java 使用錯誤(較舊)版本的 class。
是什么導致lib
中的某些文件未被刪除? (大部分文件被刪除)
作為安裝階段和卸載階段的一部分,我們已采取措施停止正在運行的應用程序和正在運行的服務。
Execute previous uninstaller和Uninstall files操作的失敗策略配置為Ask user whether to retry or quit on failure ,但我們沒有收到任何提示。
[INFO] com.install4j.runtime.beans.actions.InstallFilesAction [ID 9]: Execute action
Property directoryResolverScript: null
Property fileFilterScript: null
Property sizeCalculatorScript: null
Property acceptAllCertificates: false
Property checkFreeSpace: true
Property delay: false
Property installRuntime: true
Property rollbackSupported: true
Property saveDownloadedFiles: false
Property showFileNames: true
Property triggerReboot: true
Property updateBundledJre: true
Property validateApplicationId: false
...
Install file: C:\Program Files (x86)\App\lib\delight-nashorn-sandbox-0.1.14.jar; size: 75435 bytes; exists: false
Install file: C:\Program Files (x86)\App\lib\application-1.0.0.25194.jar; size: 1264714 bytes; exists: false
Install file: C:\Program Files (x86)\App\lib\commons-1.0.0.25194.jar; size: 995 bytes; exists: false
Install file: C:\Program Files (x86)\App\lib\error_prone_annotations-2.0.18.jar; size: 3632 bytes; exists: false
Install file: C:\Program Files (x86)\App\lib\flyway-core-6.5.7.jar; size: 293620 bytes; exists: false
...
Execute action successful after 41010 ms
[INFO] com.install4j.runtime.beans.screens.WelcomeScreen [ID 2]: Show screen
[INFO] checking writable with maximum
[INFO] Variable changed: sys.confirmedUpdateInstallation=true[class java.lang.Boolean]
...
[INFO] com.install4j.runtime.beans.actions.InstallFilesAction [ID 9]: Execute action
Property directoryResolverScript: null
Property fileFilterScript: null
Property sizeCalculatorScript: null
Property acceptAllCertificates: false
Property checkFreeSpace: true
Property delay: false
Property installRuntime: true
Property rollbackSupported: true
Property saveDownloadedFiles: false
Property showFileNames: true
Property triggerReboot: true
Property updateBundledJre: true
Property validateApplicationId: false
...
Install file: C:\Program Files (x86)\App\lib\delight-nashorn-sandbox-0.1.14.jar; size: 75435 bytes; exists: true
File times: 1669725278000, 1669618416000
Install file: C:\Program Files (x86)\App\lib\application-1.0.0.25203.jar; size: 1266730 bytes; exists: false
Install file: C:\Program Files (x86)\App\lib\commons-1.0.0.25203.jar; size: 995 bytes; exists: false
Install file: C:\Program Files (x86)\App\lib\error_prone_annotations-2.0.18.jar; size: 3632 bytes; exists: true
File times: 1669725278000, 1669618416000
Install file: C:\Program Files (x86)\App\lib\flyway-core-6.5.7.jar; size: 293620 bytes; exists: true
File times: 1669725278000, 1669618416000
...
Execute action successful after 48259 ms
更新安裝復制了application
和commons
JARs 的新版本,但不會刪除以前/舊版本。 此外,查看更新安裝的日志文件,我沒有看到正在運行任何操作來運行以前的卸載程序或卸載任何文件。
我們希望在更新現有安裝時從lib
文件夾中刪除所有文件,就像在正常卸載時刪除它們一樣。
我們希望在更新現有安裝時從 lib 文件夾中刪除所有文件
僅當您向“安裝”屏幕添加“執行先前的卸載程序”操作時才會發生這種情況。
由該操作執行的卸載程序將其日志文件保存到文件
<installation directory>/.install4j/uninstallPrevious.log
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.