请告诉我如何在Mac OS X中以编程方式更改桌面背景?我找到了,但对于windows https://stackoverflow.com/a/12212368/2838676
发布于 2014-03-09 12:37:01
public void setWallpaper(File file)
throws Exception {
String as[] = {
"osascript",
"-e", "tell application \"Finder\"",
"-e", "set desktop picture to POSIX file \"" + file.getAbsolutePath() + "\"",
"-e", "end tell"
};
Runtime runtime = Runtime.getRuntime();
Process process;
process = runtime.exec(as);
}学分
https://stackoverflow.com/questions/20203095
复制相似问题