Java 如何使用 Mac 上的命令打开 url?
Java how to open url with command on 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);
希望对您有所帮助
我在 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);
希望对您有所帮助