Change preferences by command line
Ältere Kommentare anzeigen
Dear all,
I would like to change some Matlab preferences (the ones that you reach from the "file" menu) from the command line. I found on the newsgroup some undocumented Java commands to change them (described by Yair Altman, thanks a lot), i.e.:
edit(fullfile(prefdir,'matlab.prf')); com.mathworks.services.Prefs.setStringPref('HTMLProxyHost','XX.XXX.XX.XX'); com.mathworks.services.Prefs.setStringPref('HTMLProxyPort','X');
However those commands do not work immediately, but Matlab need to be restarded to change them. Does anyone know a way to change them immediately, without restarting Matlab?
Thanks a lot! Cheers, Manfredo
5 Kommentare
Jan
am 20 Mai 2011
Of course the shown command "work immediately". I assume, they do not perform the job, you want them to do, immediately. So it would be helpful, if you explain this actual job. Showing just a method, which does not work, does not contain enough information to solve a problem.
Manfred999
am 25 Mai 2011
Jan
am 27 Mai 2011
Perhaps if you show which commands you want to influence...
Walter Roberson
am 27 Mai 2011
Well, urlread() for example, Jan. Manfred wants to change the proxy without restarting MATLAB.
Jan
am 27 Mai 2011
@Walter: That is a vlaid assumption. But perhaps the OP uses another function. I do not like to give a speculative advice about controlling com.mathworks.net.transport.MWTransportClientPropertiesFactory methods, because this command is ugly to type...
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!