Search code examples
javamacosinfo.plistmacos-big-sur

On MacOS Can I add a default setting as part of my Info.plist file for my Java application


Due to a bug in MacOS Big Sur I need to run the following command

defaults write com.jthink.songkong "AppleWindowTabbingMode" manual

for my Java application with bundled version of java

Is there a way I can add this to my Info.plist file so it is already set automatically on the new install, I can alternatively use Runtime class to run the command from within Java but it would be neater if I could just configure it as part of the Info.plist file, but I don't understand macOS enough to know if that makes sense. I managed to get it added during build time so my Info.plist file contains

<key>AppleWindowTabbingMode</key>
<string>manual</string> 

But, it has had no effect.

I'm not clear if I have done something wrong or if it is just impossible.


Solution

  • As of a few minutes ago appbundler will set the default value for the AppleWindowTabbingMode property to "manual" upon launch. If you use it as your launcher it should fix this behaviour. Or you can check the native code in the commit and use it in your own launcher if you prefer.