MATLAB GUI JAVA Error (Matlab2018b, win10)
7 views (last 30 days)
Show older comments
Error description
- When moving the cursor in the MATLAB GUI over the error indicator (orange or red) at the right side of the editor I get a java error (see pic 1: java Error and exact error message below).
- Also the help is not working properly when either pressing F1 or clicking on the question mark button in the upper right. The window opens but is empty and another java error is thrown (again a java.lang.NullPointerException).
- This behavior of MATLAB started after I installed yED (https://www.yworks.com/products/yed) which comes with its own java version. It happend to me before in the past after installing java via java.com website. Unfortunately I have no clue how I solved the problem back then.
Further Info
- The error seemst to by the same as in https://de.mathworks.com/matlabcentral/answers/443067-why-do-i-keep-getting-errors-from-java-in-matlab, however the solution (waiting until the error is solved on its own) did not work for me (waited several weeks)
- I am accessing MATLAB via VPN. It worked perfectly until I installed yED/another JAVA version. So this thread (https://de.mathworks.com/matlabcentral/answers/428384-matlab-doc-command-not-working-error-using-doc-displaydocpage-line-171)
Assumption
The problem seems to be linked to
- java
- the help function in MATLAB as the grey indicators showing where to find a marked variable in the code are working (see Picture 2)
Solutions (which did not work)
I have tried the following solutions
- uninstalling yED
- uninstalling all java versions (https://de.mathworks.com/matlabcentral/answers/364341-workaround-for-java-error)
- uninstalling MATLAB, re-boot system, re-installing matlab
- setting system variable: JAVA_MATLAB to the parent directrory of the "rt-jar" file (https://de.mathworks.com/matlabcentral/answers/130359-how-do-i-change-the-java-virtual-machine-jvm-that-matlab-is-using-on-windows)
- setting system variable: JAVA_MATLAB to a fresh installation of java 64bit (MATLAB starts but same error)
- updating MATLAB 2018b up to Update 4
Outputs which might help you to understand my problem:
- version -java ==> 'Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode'
- java.lang.System.getProperty('java.home') ==> C:\Program Files\MATLAB\R2018b\sys\java\jre\win64\jre (https://de.mathworks.com/matlabcentral/answers/225207-java-issue-with-matlab)
Picture 1: java Error
This is the exact error message:
Exception in thread "AWT-EventQueue-0": java.lang.NullPointerException
at com.mathworks.help.helpui.DocRoot.buildUrl(DocRoot.java:216)
at com.mathworks.help.helpui.DocRoot.buildDocPageUrl(DocRoot.java:44)
at com.mathworks.mlwidgets.help.CSHelpTopicMap.mapIdToUrl(CSHelpTopicMap.java:244)
at com.mathworks.mlwidgets.help.CSHelpTopicMap.mapID(CSHelpTopicMap.java:234)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.getMapID(MatlabDocUtils.java:88)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.idHasExtendedHelp(MatlabDocUtils.java:83)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.mlintTagHasExtendedHelp(MatlabDocUtils.java:99)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils.access$200(MatlabDocUtils.java:16)
at com.mathworks.mlwidgets.text.mcode.MatlabDocUtils$CodeAnalyzerDocHelper.hasExtendedHelp(MatlabDocUtils.java:148)
at com.mathworks.widgets.text.mcode.analyzer.CodeAnalyzerMessageModel$CodeAnalyzerMessage.hasExtendedInformation(CodeAnalyzerMessageModel.java:177)
at com.mathworks.widgets.text.layer.EditorTip.makeButtonPanel(EditorTip.java:402)
at com.mathworks.widgets.text.layer.EditorTip.makeSingleMessageRow(EditorTip.java:377)
at com.mathworks.widgets.text.layer.EditorTip.addShortMessageComponentsToPanel(EditorTip.java:257)
at com.mathworks.widgets.text.layer.EditorTip.makeWholeTipComponent(EditorTip.java:244)
at com.mathworks.widgets.text.layer.EditorTip.makeWholeTipComponentWithoutExtendedMessage(EditorTip.java:213)
at com.mathworks.widgets.text.layer.EditorTip.setupBalloonTip(EditorTip.java:199)
at com.mathworks.widgets.text.layer.EditorTip.show(EditorTip.java:504)
at com.mathworks.widgets.text.STPMessagePanel$MessagePanelToolTipListener.movedInsideSource(STPMessagePanel.java:494)
at com.mathworks.widgets.tooltip.ToolTipAndComponentAWTListener.mouseMovedInsideSourceComponent(ToolTipAndComponentAWTListener.java:192)
at com.mathworks.widgets.tooltip.ToolTipAndComponentAWTListener.eventDispatched(ToolTipAndComponentAWTListener.java:154)
at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Picture 2:
0 Comments
Answers (1)
Jan
on 25 Jun 2019
When uninstalling & re-installing Matlab does not help, the problem can be conserved in the preferences files. These are not replaced at a re-install. So try to recreate them: Stop Matlab and rename the preferences folder, see prefdir . Does it works afterwards? Then the installation of yED was most likely not the reason of the problem.
See also: https://www.mathworks.com/matlabcentral/answers/453269-create-a-backup-of-your-preferences-folder
(Sorry for advertising my own thread, but you cannot mention too often, that backups are required for reliable work.)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!