Opening files in editor causes a "Load of Java classes failed" in Matlab R2011a under OSX 10.6.8

1 view (last 30 days)
Hi
Whenever I try to open a file in the editor (being .m or other), a error message pops up saying:
Error using ==> open at 163
Failed to open editor. Load of Java classes failed.
This is kind of annoying since requires me to edit files outside of matlab. Any idea what might be going on here?

Accepted Answer

Friedrich
Friedrich on 25 Aug 2011
Hi,
This can happen if you have downloaded third-party software such as EasyKrig which contains a 'message.m' file. If the third-party software is high in the order of your MATLAB path, the third-party software file 'message.m' can interfere with using the MATLAB editor.
To resolve this, you put the third-party sofware lower down in the order of your MATLAB path, by using the path tool. To do this, use the mouse to navigate to the File menu and select "Set Path..." Use the GUI buttons to move the folder name with the third-party software lower down in the order of your MATLAB path, e.g. to the bottom of the path.
You can use the following command to check if a message.m exists on the MATLAB path:
which -all message
I get as output:
C:\Program Files\MATLAB\R2011a\toolbox\matlab\lang\message.m
C:\Program Files\MATLAB\R2011a\toolbox\simulink\simulink\@dependencies\message.p % dependencies method
C:\Program Files\MATLAB\R2011a\toolbox\shared\filterdesignlib\@FilterDesignDialog\message.m % FilterDesignDialog method
C:\Program Files\MATLAB\R2011a\toolbox\shared\spcuilib\@uiservices\message.m % uiservices method
  1 Comment
Nicolau
Nicolau on 25 Aug 2011
Thanks a bunch.
Indeed I had a 3rd party toolbox that contained a "message.m" file.
After moving it to the bottom of the path, I could open files again.

Sign in to comment.

More Answers (3)

cr
cr on 5 Mar 2012
I'ven't downloaded any thirdparty toolbox. This occured out of nowhere and restarting matlab or osx didn't help either. Had to reinstall matlab. Both before and after reinstallation message.m & ~.p were same on the above command.
/Applications/MATLAB_R2010a.app/toolbox/simulink/simulink/@dependencies/message.p % dependencies method
/Applications/MATLAB_R2010a.app/toolbox/shared/spcuilib/@uiservices/message.m % uiservices method

Till
Till on 16 Mar 2012
Something similar happens in R2011b on Suse Linux 11.x, the error message is then "Error using open (line 163) Too many ouput arguments." . Problem is solved by changing the order in the path as explained above, indeed a custom toolbox with "message.m" was at the top of the path. I think a permanent solution by Mathworks is needed here !?

Till
Till on 16 Mar 2012
Actually the toolbox order in the path can affect export from a figure to say, pdf, as well: If the 3rd party toolbox is at the top of the path export crashes with "Error using message Too many output arguments". The crash occurs in exportsetupdlg (R2011b, Suses 11.x).

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!