Is there a simple way to keep the “user.dir” property of the Java VM running inside of MATLAB up-to-date with the pwd that MATLAB keeps track of? Right now, I have to take care of this manually with a simple M-file which looks like (minus all of the proper input checks, etc.):
java.lang.System.setProperty('user.dir', pwd);
It’s not necessarily a huge problem, but it really is kind of a pain in the neck to keep track of this all of the time.
I tried hacking in a modified cd command that kept the two values in sync, but all it did was cause other problems, and it didn’t work at all when selecting the working directory via the navigation bar.
Unfortunately, there’s no documented way to do this (and I don’t even think there’s a feasible undocumented way either).