com.apple.java.util.prefs.plist中的OS X更改仅在mac重新启动后才会生效(Java首选项)

时间:2022-04-18 10:57:12

Quiet often I need to change values stored by java.util.prefs.Preferences manually. Thanks to this answer I found out where they are stored. But when I edit this plist file changes takes effect only after mac restart. I mean the applications ignores these changes until I restart my computer. Is there any way to change this without restart?

我经常需要手动更改java.util.prefs.Preferences存储的值。由于这个答案,我发现了它们的存储位置。但是当我编辑这个plist文件时,更改只有在mac重启后才会生效。我的意思是应用程序忽略这些更改,直到我重新启动计算机。有没有办法在不重启的情况下改变它?

My code to change plist

我改变plist的代码

plutil -convert xml1 /Users/<myuser>/Library/Preferences/com.apple.java.util.prefs.plist
nano /Users/<myuser>/Library/Preferences/com.apple.java.util.prefs.plist
plutil -convert binary1 #do something and save the file /Users/<myuser>/Library/Preferences/com.apple.java.util.prefs.plist

The same occurs when I edit this plist using xcode.

当我使用xcode编辑这个plist时也会出现同样的情况。

1 个解决方案

#1


You have to run killall cfprefsd in OS X 10.9+

你必须在OS X 10.9+中运行killall cfprefsd

https://manytricks.com/blog/?p=3049

#1


You have to run killall cfprefsd in OS X 10.9+

你必须在OS X 10.9+中运行killall cfprefsd

https://manytricks.com/blog/?p=3049