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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by