Error in opening .m files

whenever I try to open any .m file I get this error... Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/mathworks/cmlink/api/customization/CustomizationWidgetFactory at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.mathworks.matlab.api.explorer.ExtensionRegistry.addExtension(ExtensionRegistry.java:51) at com.mathworks.mlwidgets.explorer.model.ExplorerExtensionRegistry.init(ExplorerExtensionRegistry.java:106) at com.mathworks.mlwidgets.explorer.model.ExplorerExtensionRegistry.<clinit>(ExplorerExtensionRegistry.java:44) at com.mathworks.mlwidgets.explorer.model.actions.DefaultActionInput.<init>(DefaultActionInput.java:34) at com.mathworks.mde.editor.PathActionInputSource.createInput(PathActionInputSource.java:41) at com.mathworks.mde.editor.PathActionInputSource.getCurrentInput(PathActionInputSource.java:37) at com.mathworks.mlwidgets.explorer.model.actions.ActionManager.instantiateActions(ActionManager.java:307) at com.mathworks.mlwidgets.explorer.model.actions.ActionManager.<init>(ActionManager.java:113) at com.mathworks.mde.editor.EditorViewClient.createPathActionManager(EditorViewClient.java:702) at com.mathworks.mde.editor.EditorViewClient.init(EditorViewClient.java:246) at com.mathworks.mde.editor.EditorViewClient.<init>(EditorViewClient.java:177) at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:865) at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClient(MatlabEditorApplication.java:850) at com.mathworks.mde.editor.MatlabEditorApplication.createEditorViewClientFromExistingFile(MatlabEditorApplication.java:842) at com.mathworks.mde.editor.MatlabEditorApplication.access$500(MatlabEditorApplication.java:82) at com.mathworks.mde.editor.MatlabEditorApplication$7.runWithOutput(MatlabEditorApplication.java:567) at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:475) at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:436) at java.awt.event.InvocationEvent.dispatch(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.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) Caused by: java.lang.ClassNotFoundException: com.mathworks.cmlink.api.customization.CustomizationWidgetFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 34 more
Please help me solve the problem

2 Comments

Jan
Jan on 16 Apr 2018
Give us a chance to help you. Explain, when the problem occurred: After installing Matlab? After a specific change, e.g. an update of the OS? Maybe a Java update under MacOS? Did you try to repair the Matlab installation? Perhaps un-install and re-install? From where do you try to "open" the M-file?
It was working alright initially. I think it is after a windows update but I am not sure. I tried to open the file directly, from the toolstrip in matlab and also from the command window. All of them showed similar errors. And the worst thing is I cant even uninstall it.....It gives the following error when uninstalling background merge hit exception: _x(4.6):C7855 _13(4.6):C7515 _16(4.6):C6763 _1a(4.6):C6612 _v(4.6):C5753 _z(4.6):C7530 _11(4.6):C7507 _y(4.6):C7645 _n(4.6):C6136 _1b(4.6):C6265 _15(4.6):C5487 _w(4.6):C5794 _10(4.6):C5540 _s(4.6):C5887 _k(4.6):C5351 _2(4.6):C6635 _i(4.6):C5522 _8(4.6):C5741 _3(4.6):C5674 _9(4.6):C4881 _r(4.6):C4378 _18(4.6):C4387 _a(4.6):C3686 _h(4.6):C4584 _1d(4.6):C3591 _u(4.6):C3520 _1c(4.6):C2259 _t(4.6):C2147 _m(4.6):C1397 _1e(4.6):C1359 into _1k [maxNumSegments=1].

Sign in to comment.

Answers (1)

Jan
Jan on 16 Apr 2018

0 votes

Restore the Matlab folder from your backup. If you do not have a backup - bad idea. Try to install Matlab again without a further un-installation. This might repair Matlab such, that an uninstall works.

If this does not work also, contact the technical support. Of course, check your hard disk at first by chkdsk and sfc /scannow - but such standard methods do not concern Matlab, but the operating system only.

Categories

Tags

Asked:

on 16 Apr 2018

Answered:

Jan
on 16 Apr 2018

Community Treasure Hunt

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

Start Hunting!