0
這是很容易打開Mac上的終端與下面的代碼:有沒有一種方法可以在使用Java打開終端時指定主文件夾?
Runtime runtime = Runtime.getRuntime();
String[] cmd = {"/Applications/iTerm.app/Contents/MacOS/iTerm"}
runtime.exec(cmd);
BobZhao @ MAC:〜> PWD
/用戶/ BobZ
我的默認主文件夾是/用戶/ BobZ和有沒有辦法指定一個路徑,而打開終端?