Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Detect browsers installed in a system

Tags:

java

browser

Using Java, how can I detect all of the browsers that are installed on a system?

like image 241
karthick Avatar asked Sep 03 '25 01:09

karthick


1 Answers

You can't.

You can open a page using the default browser on a system with Java 6 *, but you can't list all browsers installed on a system.

Sure, you can iterate over Windows' C:\Program Files\ folder or *nix's /usr/local (or other dirs) to check for browser names, but you might run into user-privilege issues and you're never guaranteed to get all browsers, nor is this OS independent.

  • http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/desktop_api/
like image 68
Bart Kiers Avatar answered Sep 05 '25 15:09

Bart Kiers