Java如何在Mac上用命令打开url?

Java如何在Mac上用命令打开url?,java,macos,url,command,Java,Macos,Url,Command,我使用以下方法在Windows上的浏览器中打开url: Command="C:\\Program Files\\Internet Explorer\\IEXPLORE "+Url; Process Child=Runtime.getRuntime().exec(Command); 我应该如何在Mac上实现同样的功能?尝试打开 String Command="open "+"http://google.ca"; Process Child=Runtime.getRuntime().exec(C

我使用以下方法在Windows上的浏览器中打开url:

Command="C:\\Program Files\\Internet Explorer\\IEXPLORE "+Url;

Process Child=Runtime.getRuntime().exec(Command);
我应该如何在Mac上实现同样的功能?

尝试
打开

String Command="open "+"http://google.ca";
Process Child=Runtime.getRuntime().exec(Command);
希望这有帮助