I cannot inspect the workspace on MATLAB for linux

10 ビュー (過去 30 日間)
Andrea Nardin
Andrea Nardin 2021 年 3 月 5 日
コメント済み: Andrea Nardin 2021 年 8 月 18 日
I have an issue running MATLAB 2020a on Ubuntu 20.04. MATLAB starts up properly but it shows the
PostVMInit failed to initialize com.mathworks.mwswing.MJStartupForDesktop
message.
Then, when I want to inspect a variable all I get is a series of errors, e.g.:
Exception in thread "AWT-EventQueue-0": java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.mwswing.MJStartupForDesktop
at com.mathworks.mwswing.MJStartup.init(MJStartup.java:95)
at com.mathworks.mwswing.MJStartup.init(MJStartup.java:72)
at com.mathworks.widgets.spreadsheet.SpreadsheetColor.<clinit>(SpreadsheetColor.java:58)
at com.mathworks.widgets.spreadsheet.SpreadsheetTable.setupColorHandlers(SpreadsheetTable.java:314)
at com.mathworks.widgets.spreadsheet.SpreadsheetTable.<init>(SpreadsheetTable.java:198)
at com.mathworks.mlwidgets.array.AbstractMatlabTable.<init>(AbstractMatlabTable.java:65)
at com.mathworks.mlwidgets.array.ArrayTable.<init>(ArrayTable.java:102)
at com.mathworks.mlwidgets.array.ArrayEditorProvider.createProvider(ArrayEditorProvider.java:55)
at com.mathworks.mlwidgets.array.ValueEditorProviderRegistry.getArrayViewer(ValueEditorProviderRegistry.java:402)
at com.mathworks.mlwidgets.array.ValueEditorProviderRegistry.getValueEditorProvider(ValueEditorProviderRegistry.java:83)
at com.mathworks.mlwidgets.array.ValuePanel$UpdateListener.actionPerformed(ValuePanel.java:221)
at com.mathworks.mlwidgets.array.ValueMetaInfoRequester$VICO.matlabEvent(ValueMetaInfoRequester.java:143)
at com.mathworks.jmi.MatlabMCR$AWTReplyEvent.run(MatlabMCR.java:1641)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0": java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.widgets.spreadsheet.SpreadsheetColor
at com.mathworks.widgets.spreadsheet.SpreadsheetTable.setupColorHandlers(SpreadsheetTable.java:314)
at com.mathworks.widgets.spreadsheet.SpreadsheetTable.<init>(SpreadsheetTable.java:198)
at com.mathworks.mlwidgets.array.AbstractMatlabTable.<init>(AbstractMatlabTable.java:65)
at com.mathworks.mlwidgets.array.ArrayTable.<init>(ArrayTable.java:102)
at com.mathworks.mlwidgets.array.ArrayEditorProvider.createProvider(ArrayEditorProvider.java:55)
at com.mathworks.mlwidgets.array.ValueEditorProviderRegistry.getArrayViewer(ValueEditorProviderRegistry.java:402)
at com.mathworks.mlwidgets.array.ValueEditorProviderRegistry.getValueEditorProvider(ValueEditorProviderRegistry.java:83)
at com.mathworks.mlwidgets.array.ValuePanel$UpdateListener.actionPerformed(ValuePanel.java:221)
at com.mathworks.mlwidgets.array.ValueMetaInfoRequester$VICO.matlabEvent(ValueMetaInfoRequester.java:143)
at com.mathworks.jmi.MatlabMCR$AWTReplyEvent.run(MatlabMCR.java:1641)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
From this moment ANY command window output is followed by a series of error meassages of this type:
Exception in thread "AWT-EventQueue-0": java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.widgets.spreadsheet.SpreadsheetColor
I don't know if it's related, but MATLAB starts with SOTWARE OPENGL rendering.
NOTE: If I run MATLAB as root the problem is gone!
Non-successfull solutions tried:
I alried tried to erase preferences (Solution#1 from this answer)
I tried to use the system's JVM (openjdk 8) setting the MATLAB_JAVA variable accordingly.
None of the solutions from this answer worked
  2 件のコメント
Dushyant Sahoo
Dushyant Sahoo 2021 年 8 月 16 日
Were you able to find a solution for it?
Andrea Nardin
Andrea Nardin 2021 年 8 月 18 日
Yes, the Mathworks support provided me a patch to solve the issue for the ML version in use.

サインインしてコメントする。

回答 (1 件)

Maadhav Akula
Maadhav Akula 2021 年 3 月 8 日
Looks like a JAVA issue, reach out to Mathworks Support:

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by