Top.Mail.Ru
April 29th, 2005 - Java developers — LiveJournal
? ?

Java developers

April 29th, 2005
Image

11:54 am - Imagebanana - Launching a browser

I have a Swing app that interacts with a server. If everything goes well, the server replies with a URL. I'd like the user to be able to go to the URL in their web browser. My problem is that the way to do this is platform dependent. On Windows, start http://www.example.com/ is good but on another OS that won't work (e.g. bash: start: command not found). I could come up with a set of commands that will work on various OSs but that will always fail for someone somewhere. I'm hoping that there's a Java API way to do this that I'm missing. Any suggestions?

BTW, the app is Jix and the URL is where to find a picture that it's just uploaded.

Powered by LiveJournal.com
Image