• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Launch default browser on Mac OS X?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could someone show me some hints on how to launch a default browser on Mac OS X to display a url (could be local or remote)?
Thanks.
Chen
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

We've got a whole forum devoted to Java on the Mac; I'll move your post there for you, where it's more likely to get a good answer.
[ July 21, 2004: Message edited by: Ernest Friedman-Hill ]
 
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to try BrowserLauncher. I've not tried it with MacOS, but the latest version claims to support MacOS X.

It's not platform-specific and so is (IMHO) a much nicer solution than a MacOS X-specific solution...if it works, of course


--Tim
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a look through the code (released June 2001?) and I have absolutely no idea what it does! Native methods, tons of Mac stuff...
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the OSX command line you can do something like this:
open http://www.yahoo.com

This will open the given URL in the default browser, launching the program if need be. So all you need to do is wrap it in a Java program.run call.
 
rubbery bacon. crispy tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!