Skip to main content
Solved

modify com.apple.java.util.prefs.plist at ~/Library/Preferences/


 

Hello to all ;)
I hope, someone can help me to find a solution for my question:
We use an app, based on Java®. There are some settings for this app configured at ~/Library/Preferences/com.apple.java.util.prefs.plist.
Now, we have to modify some settings. To do this, I wrote a small script, that works very well. The file is modified and stored with the new entries. BUT: If I start the app, the file will be reset to the old values.
I have no idea, where the "old version" comes from. I guess, that there is a backup version somewhere, maybe in a cache and a system process restores the original version of the plist.
Does anyone have an idea, how I could fix this?

Best answer by Anonymous

Hello all :)

I was able to solve it by myself.
For those, who are looking for a solution for this theme, here is the trick:

It seems to be necessary to kill the plist deamon before modifying the plist file. There is a command to do this: 

 

killall cfprefsd

 

Running this command before editing the plist file is preventing from "restoring" the file to its older version.

View original
Did this topic help you find an answer to your question?

2 replies

  • 0 replies
  • Answer
  • June 27, 2022

Hello all :)

I was able to solve it by myself.
For those, who are looking for a solution for this theme, here is the trick:

It seems to be necessary to kill the plist deamon before modifying the plist file. There is a command to do this: 

 

killall cfprefsd

 

Running this command before editing the plist file is preventing from "restoring" the file to its older version.


dlondon
Forum|alt.badge.img+14
  • Honored Contributor
  • 376 replies
  • June 28, 2022

Just wondering how you modified the plist in your script?  Was it using the defaults command?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings