我试图在卸载时清除我的 java 应用程序的用户 java.util.prefs.Preferences 节点。为此,我在卸载程序步骤中使用“删除 Java 首选项存储中的节点或键”操作来删除保存首选项的包。
这适用于(在 Windows 上)不包含句点的包名称(“test”)。该包在注册表中被删除。
但是,如果包包含句点(“test.test”),我无法让它工作。
我在installation.log中收到的错误消息:
[INFO] com.install4j.runtime.beans.actions.registry.DeletePreferenceItemAction [ID 1006]: Execute action
Property key:
Property onlyIfEmpty: false
Property preferenceDeleteType: User specific
Property packageName: test.test
Property rollbackSupported: true
[ERROR] com.install4j.runtime.beans.actions.registry.DeletePreferenceItemAction [ID 1006]: Package test.test does not exist
Execute action not successful after 2 ms
这是“删除 Java 首选项存储中的节点或键”操作的配置:
Package name: test.test
Key: i left this empty (i want to delete the entire package)
Preference root: User specific
其他值为默认值。
我还尝试了以下包名称值:
test\.test
"test.test"
但是没有效果。我们已经有很多用户拥有注册表项,因此最好不要重命名包名称。有办法做到这一点吗?
谢谢!
最佳答案
install4j 将输入的包名称转换为路径名称,因此“.”被替换为“/”。我已经在 6.0.5 中添加了转义,因此输入“test.test”将从该版本开始工作。要获取预发布版本,请联系 support@ej-technologies.com。
关于java - 删除 java 首选项存储中包含句点的节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32567086/