Skip to content

Javaaddpath May Not Work Properly Due to Search Location #4

@TheOriginalMrClean

Description

@TheOriginalMrClean

If the end file location is not in the current working directory of MATLAB, ReadYamlRaw() and WriteYaml() may not properly import snakeyaml because the javapath was not added correctly.

This is due to these lines:

 [pth,~,~] = fileparts(filename);
...

...
if not(ismember(dp, javaclasspath ('-dynamic')))
       javaaddpath(dp); % javaaddpath clears global variables...!?
end

Notice how the script is looking at the current directory of the file rather than the current working directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions