I'm developing a swing based Java application (Java 8) for Mac and Windows. Some users have set the mac system preference under "General" "Prefer Tabs when opening documents" to "Always" or "Full screen". When the setting is set to "Never" it works without problems.

This setting causes some weird state in which the window opens a new tab which results in a frozen application which can only be force quitted. I cannot assume that users know about this hidden setting in the Mac OS system preferences.

Three solutions would work for me:
This change in Big Sur is causing a bug in Java https://bugs.openjdk.java.net/browse/JDK-8256465
There is a workaround from MacOS terminal window you can run
defaults write net.java.openjdk.cmd "AppleWindowTabbingMode" manual
or if you have java bundled within your own application use the value of CFBundleIdentifier in the applications Info.plist file
e.g
defaults write net.myapp.com "AppleWindowTabbingMode" manual
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With