C:\Program Files\MATL​AB\R2015b\​toolbox\lo​cal\pathde​f.m: Cannot open file: permission denied

14 visualizzazioni (ultimi 30 giorni)
An error on a compute used for MatLab processing has recently started occurring (error at the end). We tried the recommended fix and it does work but only until the computer is restarted, then the problem reappears. User confirms the file is present and accessible. Any suggestions on a permenant fix?
Thanks
Steve
C:\Program Files\MATLAB\R2015b\toolbox\local\pathdef.mpathdef.m: Cannot open file: permission denied.
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\R2015b\toolbox\local
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 (line 120)
Warning: Initializing MATLAB Graphics failed.
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 or variable 'ismac'.
> In hgrc (line 145)
In matlabrc (line 126)
Warning: Failed to add default profiler filters.
> In matlabrc (line 135)
Academic License
Undefined function or variable 'usejava'.
Error in matlabrc (line 189)
if ~(ismcc || isdeployed || feature('isdmlworker')) && usejava('jvm')
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:251)
at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:123)
at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1032)
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)

Risposte (1)

Sai Sumanth Korthiwada
Sai Sumanth Korthiwada il 10 Feb 2023
Hi Steve,
I understand that you are facing an issue while launching MATLAB R20215b. To resolve this issue, please follow the troubleshooting steps mentioned below:
1. In MATLAB Command Window, execute the following commands:
>> restoredefaultpath
>> rehash toolboxcache
>> matlabrc
>> savepath
These commands will generate a new file "pathdef.m". Please relaunch the MATLAB application.
2. The issue can occur if you do not have 'write' permissions on the folder where MATLAB is installed.
For windows:
Please refer to the below mentioned link:
For Unix/Linux based operating system:
To resolve this issue, open terminal and run the appropriate command to recursively change the user's permissions on the MATLAB folder to read/write/execute:
sudo chmod -R 755 ./MATLAB
Hope this helps.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by