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!