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
#1
You have to run killall cfprefsd
in OS X 10.9+
你必须在OS X 10.9+中运行killall cfprefsd