Java Error when using FX button
9 次查看(过去 30 天)
显示 更早的评论
Hello.
I am running MatLab 2015a 32bit and when I am in the command widow and press the FX button to receive a list of functions I receive the following error. I have updated my java. Is there anything I can do?
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.mlwidgets.help.ProductFilterModel$InstalledState
at com.mathworks.mlwidgets.help.DocCenterProductPrefs.getSelectedProductsFromPref(DocCenterProductPrefs.java:47)
at com.mathworks.mlwidgets.help.DocCenterProductPrefs.getProductFilterModel(DocCenterProductPrefs.java:33)
at com.mathworks.mlwidgets.help.DocCenterDocConfigParams.<init>(DocCenterDocConfigParams.java:37)
at com.mathworks.mlwidgets.help.DocCenterDocConfig.getLocalConfig(DocCenterDocConfig.java:77)
at com.mathworks.mlwidgets.help.DocCenterDocConfig.getInstance(DocCenterDocConfig.java:65)
at com.mathworks.mlwidgets.help.InstalledProductUtils.findInstalledDocProducts(InstalledProductUtils.java:165)
at com.mathworks.mlwidgets.help.InstalledProductUtils.getInstalledDocProducts(InstalledProductUtils.java:53)
at com.mathworks.mlwidgets.help.HelpPrefs.getInstalledDocProducts(HelpPrefs.java:695)
at com.mathworks.mlwidgets.actionbrowser.FunctionReferenceUtils.getInstalledFunctionData(FunctionReferenceUtils.java:112)
at com.mathworks.mde.functionbrowser.FunctionTableModel.buildAllCategories(FunctionTableModel.java:134)
at com.mathworks.mde.functionbrowser.FunctionTableModel.<init>(FunctionTableModel.java:52)
at com.mathworks.mde.functionbrowser.FunctionBrowserPanel.init(FunctionBrowserPanel.java:110)
at com.mathworks.mde.functionbrowser.FunctionBrowserPanel.<init>(FunctionBrowserPanel.java:55)
at com.mathworks.mde.functionbrowser.FunctionBrowser.<init>(FunctionBrowser.java:65)
at com.mathworks.mde.functionbrowser.FunctionBrowser.utOpen(FunctionBrowser.java:304)
at com.mathworks.mde.functionbrowser.FunctionBrowser.open(FunctionBrowser.java:148)
at com.mathworks.mde.cmdwin.FunctionBrowserRowHeader$6.actionPerformed(FunctionBrowserRowHeader.java:191)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at com.mathworks.mwswing.MJButton.processMouseEvent(MJButton.java:348)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(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$200(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$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.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$1.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)
0 个评论
采纳的回答
Christiaan
2015-8-4
Dear Sir, Madame,
The "NoClassDefFoundError" error is thrown because MATLAB was not able to locate Java Runtime libraries that are used by the Integrated Development Environment (MATLAB IDE).
There are several possible causes to this issue:
A. The installation is corrupted and there are .jar files missing from the MATLAB installation folder.
B. The classpath.txt file is missing references to Java Runtime libraries.
C. One or several internal MATLAB functions are shadowed by custom functions.
Let us start from the bottom (C):
1. Are there M-files on the MATLAB search path with the same name as internal MATLAB functions?
The search path defines the location where MATLAB looks for an M-file. For example, if I type "plot(1:10)" at the command line, MATLAB looks in all the folders on the search path for an M-file with the name "plot.m". If several files named "plot.m" exist, MATLAB uses the one at the top of the search path (the first one it encounters). If I create my own "plot.m" function and save it in the start-up folder, this file will be at the top of the search path and MATLAB will call it every time "plot" is used in MATLAB. This is what we call "shadowing."
To take a look at the MATLAB search path, execute "pathtool" in the Command Window. This will open up the Set Path window with the list of folders that MATLAB parses. The start-up folder should be at the top.
You can try to restore the search path to the installation default by executing the following commands:
>> restoredefaultpath >> rehash toolboxcache
However, this will not remove the start-up directory from the MATLAB search path. If the start-up folder contains M-files, try to remove them or move them to another folder which is not on the search path.
2. If the issue still persists, the installation might be corrupted. Remove MATLAB completely and install it again to resolve the issue.
Kind regards, Christiaan
0 个评论
更多回答(2 个)
Guerroudj Abdelmalek
2015-10-20
i have same problem ; i think the problem is in Matlab version
0 个评论
PRIYA ALAGARSAMY
2016-3-8
编辑:Walter Roberson
2016-3-8
I am running MatLab 2015a 32bit and when I am press the help button I have receive the following error
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.mlwidgets.help.ProductFilterModel$InstalledState
at com.mathworks.mlwidgets.help.DocCenterProductPrefs.getSelectedProductsFromPref(DocCenterProductPrefs.java:47)
at com.mathworks.mlwidgets.help.DocCenterProductPrefs.getProductFilterModel(DocCenterProductPrefs.java:33)
at com.mathworks.mlwidgets.help.DocCenterDocConfigParams.<init>(DocCenterDocConfigParams.java:37)
at com.mathworks.mlwidgets.help.DocCenterDocConfig.getLocalConfig(DocCenterDocConfig.java:77)
at com.mathworks.mlwidgets.help.DocCenterDocConfig.getInstance(DocCenterDocConfig.java:65)
at com.mathworks.mde.help.DocCenterBrowserHandler.resolveHelpBrowserTaskUrl(DocCenterBrowserHandler.java:116)
at com.mathworks.mde.help.DocCenterBrowserHandler.getUrlDisplayBehavior(DocCenterBrowserHandler.java:85)
at com.mathworks.mde.help.DocCenterBrowserHandler.doHelpBrowserTask(DocCenterBrowserHandler.java:45)
at com.mathworks.mde.help.DocCenterBrowserHandler.doHelpBrowserTask(DocCenterBrowserHandler.java:39)
at com.mathworks.mde.help.DocCenterBrowserHandler.invoke(DocCenterBrowserHandler.java:342)
at com.mathworks.mde.help.HelpBrowserBridge.invoke(HelpBrowserBridge.java:39)
at com.mathworks.mlservices.MLHelpServices.invoke(MLHelpServices.java:38)
at com.mathworks.mde.desk.MLDesktop$HelpProductPageAction.actionPerformed(MLDesktop.java:3084)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at com.mathworks.toolstrip.components.DropDownButtonModel.originalSetPressed(DropDownButtonModel.java:31)
at com.mathworks.toolstrip.components.SplitButtonModel.setPressed(SplitButtonModel.java:35)
at com.mathworks.toolstrip.plaf.SplitButtonUI$MyToolstripButtonListener.mouseReleased(SplitButtonUI.java:558)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at com.mathworks.mwswing.MJButton.processMouseEvent(MJButton.java:348)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(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$200(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$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.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$1.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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!