Why am I getting the error message "AWT-EventQueue-0" java.lang.IllegalArgumentException: The given File must have an absolute path"?
2 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2016-11-28
回答: MathWorks Support Team
2016-11-28
I am using the "path" function in my "startup.m" file to add a particular directory to my MATLAB path. For example :
>> path = ('\temp_folder', path);
When I click Open -> Open As Text for a particular file in that directory, I see the error message "AWT-EventQueue-0" java.lang.IllegalArgumentException: The given File must have an absolute path.
Why is this?
采纳的回答
MathWorks Support Team
2016-11-28
The reason this error message appears is because the "path" function was used to append a directory to the MATLAB path within the "startup.m" file.
To append directories to the MATLAB path, use the "addpath" function instead.
For example :
>> path = ('\temp_folder', path); % Incorrect way to add to path.
>> addpath('temp_folder'); % Correct way to add to path.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Debugging and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!