2

I use the following to open a url in a browser on Windows :

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

Process Child=Runtime.getRuntime().exec(Command);

What should I do to achieve the same on Mac ?

Frank
  • 30,590
  • 58
  • 161
  • 244

1 Answers1

3

Try open.

String Command="open "+"http://google.ca";
Process Child=Runtime.getRuntime().exec(Command);

Hope this helps

NawaMan
  • 25,129
  • 10
  • 51
  • 77