The above error is related to "Accessibility", which is also known as "Universal Access" for Mac (this is under Apple menu > System preferences > Universal Access). This is an issue with third-party applications on Mac that interfere with Java's accessibility code, and it is not specific to one single action, but it can occur with any feature of MATLAB using Java. It has been observed to take place in startup, when using the Live Editor, and also when making use of the Add-Ons button and Add-Ons, Packages and Apps managers. There are several Java bugs related to Accesibility and reported by Oracle.
To workaround this issue, check if the interaction between the third party software and MATLAB can be disabled.
If above method doesn't work, completely disable Accessibility ("Universal Access") in your Mac. Please reboot your computer and restart MATLAB afterwards.
In case this does not solve the issue, you may need to delete the file "com.apple.universalaccess.plist". You can restart your Mac afterwards, so that it is now started with the default "com.apple.universalaccess.plist" file. Please refer to the following link for more information about deleting this kind of files:
If it is not possible for you to completely disable Universal Access, you may try to work around this issue by only disabling the apps that are making use of it. It has been previously observed that such errors are getting generated with third party applications like "bettertouchtool", "bettersnaptool" or "cinch" installed on the system.
Below is a list of some third-party Accessibility software that has been seen to result in Java errors in MATLAB:
- Window Magnet or Magnet
If the system has some of the above mentioned, or any other third party extensions that require "Universal Access" to be enabled, then uninstall them, restart the system and then open MATLAB to see if the issue has been resolved. You can check which apps are making use of Universal Access on the Apple menu > System preferences > Universal Access.
If there are any third party applications that are useful to you and it is not possible for you to uninstall them, try the following steps:
- (After uninstalling all of them as mentioned above) Re-install each application that needs "Universal Access" to be enabled one at a time. Reboot the system and restart MATLAB to see which is the application that is causing the incompatibility.
- If no errors are generated, the application can be used. Otherwise, it needs to be uninstalled as MATLAB does not support all third party applications currently.