【发布时间】:2016-12-09 19:15:25
【问题描述】:
我使用以下方法在 Windows 上的浏览器中打开一个 url:
Command="C:\\Program Files\\Internet Explorer\\IEXPLORE "+Url;
Process Child=Runtime.getRuntime().exec(Command);
我应该怎么做才能在 Mac 上达到同样的效果?
【问题讨论】:
我使用以下方法在 Windows 上的浏览器中打开一个 url:
Command="C:\\Program Files\\Internet Explorer\\IEXPLORE "+Url;
Process Child=Runtime.getRuntime().exec(Command);
我应该怎么做才能在 Mac 上达到同样的效果?
【问题讨论】:
试试open。
String Command="open "+"http://google.ca";
Process Child=Runtime.getRuntime().exec(Command);
希望对你有帮助
【讨论】: