One might use matlab.addons.installedAddons to check if a Matlab package is installed.
However, if not using the "New Desktop" such that feature('webui')
is true, Java is invoked by this function, which might fail.
Matlab R2025a always uses feature('webui') so you're good.
Matlab R2024b and older might not be using the New Desktop, which was not installed by default.
Last active
August 5, 2025 23:00
-
-
Save scivision/135f9cf2f8aa84287898ba6731c0a6d2 to your computer and use it in GitHub Desktop.
Matlab matlab.addons.installedAddons uses Java when not using feature('webui') (The New Desktop mandatory in R2025a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Error experienced with Matlab R2024b on macOS that was not using the New Desktop | |
# feature('webui') == false | |
Error using getInstalledAddOns (line 31) | |
Java exception occurred: | |
java.lang.UnsatisfiedLinkError: | |
com.mathworks.connector.message_service.api.JniMessageServiceAdaptor.doStart()V | |
at | |
com.mathworks.connector.message_service.api.JniMessageServiceAdaptor.doStart(Native | |
Method) | |
at | |
com.mathworks.connector.message_service.api.JniMessageServiceAdaptor.start(JniMessageServiceAdaptor.java:27) | |
at | |
com.mathworks.matlabserver.connector.impl.ConnectorImpl.startMessageService(ConnectorImpl.java:523) | |
at | |
com.mathworks.matlabserver.connector.impl.ConnectorImpl.doStart(ConnectorImpl.java:413) | |
at | |
com.mathworks.matlabserver.connector.impl.ConnectorImpl.doEnsureServiceOn(ConnectorImpl.java:237) | |
at | |
com.mathworks.matlabserver.connector.api.Connector.ensureServiceOn(Connector.java:150) | |
at | |
com.mathworks.addons_common.notificationframework.UnifiedUninstallerHelper.<init>(UnifiedUninstallerHelper.java:28) | |
at | |
com.mathworks.addons_common.notificationframework.UnifiedUninstallerHelper.initialize(UnifiedUninstallerHelper.java:35) | |
at | |
com.mathworks.addons_common.notificationframework.InstalledAddOnsCache.<init>(InstalledAddOnsCache.java:38) | |
at | |
com.mathworks.addons_common.notificationframework.InstalledAddOnsCache.<init>(InstalledAddOnsCache.java:29) | |
at | |
com.mathworks.addons_common.notificationframework.InstalledAddOnsCache$LazyHolder.<clinit>(InstalledAddOnsCache.java:52) | |
at | |
com.mathworks.addons_common.notificationframework.InstalledAddOnsCache.getInstance(InstalledAddOnsCache.java:56) | |
Error in matlab.addons.installedAddons (line 36) | |
addons = getInstalledAddOns(); | |
^^^^^^^^^^^^^^^^^^^^ | |
Error in <snip> | |
addons = matlab.addons.installedAddons; | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
Exception in thread "connector": org.apache.commons.lang.NotImplementedException: Connector is not running. Use Connector.ensureServiceOn() to ensure it is running before using it. | |
at com.mathworks.messageservice.MessageServiceFactory.getBuilder(MessageServiceFactory.java:39) | |
at com.mathworks.messageservice.MessageServiceFactory.getMessageService(MessageServiceFactory.java:17) | |
at com.mathworks.peermodel.synchronizer.utils.PeerModelInitialize.initialize(PeerModelInitialize.java:20) | |
at com.mathworks.matlabserver.connector.impl.ConnectorImpl.startPeerModel(ConnectorImpl.java:528) | |
at com.mathworks.matlabserver.connector.impl.ConnectorImpl.doStart(ConnectorImpl.java:414) | |
at com.mathworks.matlabserver.connector.impl.ConnectorImpl$1.lambda$run$0(ConnectorImpl.java:194) | |
exit status 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment