-1

I am designing small Java application and there is a webDriver in it. The application will collect information from a web service.

One of the requirements for this app is no particular browser dependency. That is, I don't know which browser is installed on the end user PC. As a result, I need to use the default browser. How do I do this?

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
noname.404
  • 335
  • 3
  • 11
  • 4
    What do you want to do with the browser - just load a URL? If so, then this question may have your answer: http://stackoverflow.com/questions/10967451/open-a-link-in-browser-with-java-button – Duncan Jones Feb 12 '13 at 07:52
  • Check the user agent. It should be in your HTTP request: http://stackoverflow.com/questions/1493617/looking-for-a-java-user-agent-string-parser – fmsf Feb 12 '13 at 08:03
  • @fmsf I think you've totally misread the question there. – Donal Fellows Feb 12 '13 at 09:40

1 Answers1

1

in Windows :you can use browse(URI uri) function in Desktop class ,it launches the default browser to display uri

Desktop.getDesktop().browse("/////URI");
Alya'a Gamal
  • 5,624
  • 19
  • 34