After a fresh install of 2012a I was welcomed by the following message:
Cannot find function, getDefaultUserFolder, in library services.
Warning: MATLAB did not appear to successfully set the search path. To recover for this session of
MATLAB, type "restoredefaultpath;matlabrc". To find out how to avoid this warning the next time you
start MATLAB, type "docsearch problem path" after recovering for this session.
Warning: Duplicate directory name: C:\Program Files\MATLAB\R2012a\toolbox\local.
Warning: Initializing Handle Graphics failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup,
which should be resolved as soon as possible. Error detected was:
MATLAB:undefinedVarOrClass
Undefined variable "graphics" or class "graphics.internal.initializeMATLABRoot".
Warning: Initializing Java preferences failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup,
which should be resolved as soon as possible. Error detected was:
MATLAB:UndefinedFunction
Undefined function 'usejava' for input arguments of type 'char'.
> In matlabrc at 113
Warning: Failed to add default profiler filters.
> In matlabrc at 168
Meaning that no paths was added and no MATLAB functions could be used. "restoredefaultpath" did make functions usable but gave warnings about duplicate directories. And matlabrc still gave warnings too. After restoring and saving the path, a reboot of MATLAB gave the same message. Even reinstalling MATLAB did not help.
At first everything was hopeless and it seemed nobody else had ever experienced this (from a google search). Has anybody else had this problem but not written about it?
I managed to find a solution finally, so I figured I should post it somehow. I guess an answer to my own question is the best way.
Best Answer