Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to Launch "safari" browser from java

843810Sep 2 2004 — edited Sep 5 2004
Using "Runtime.getRuntime().exec(...), I wrote:

String MAC_PATH = "/Applicatios/safari.app/Contents/MacOS/safari";
String url="http://www.yahoo.com";
String cmd = MAC_PATH + " " + url;
Process p = Runtime.getRuntime().exec(cmd);

It launches "safari", so the MAC_PATH is working but doesn't recognize the url. an error message pops up saying " can't find file "user.http://yahoo.com" .

How can i make it to work so it shows the wedsite.

Thanks
Paulo

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 3 2004
Added on Sep 2 2004
2 comments
318 views