我使用以下命令在Windows上的浏览器中打开网址:
Command="C:\\Program Files\\Internet Explorer\\IEXPLORE "+Url;
Process Child=Runtime.getRuntime().exec(Command);
我应该怎么做才能在Mac上实现同样的目标?
答案 0 :(得分:3)
尝试open
。
String Command="open "+"http://google.ca";
Process Child=Runtime.getRuntime().exec(Command);
希望这有帮助