getting the default browser+MIME data - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

getting the default browser+MIME data

waleed_cs2000waleed_cs2000 Posts: 1Member
hi all
I want to ask : how to get the current system default browser by java code at runtime (IE,firefox,...)? and how to get its specific version ? also how to get the supported MIME type of that browser also by java code?

this is intended to be part of a network agent by java.
thanks

Comments

  • zibadianzibadian Posts: 6,349Member
    : hi all
    : I want to ask : how to get the current system default browser by
    : java code at runtime (IE,firefox,...)? and how to get its specific
    : version ? also how to get the supported MIME type of that browser
    : also by java code?
    :
    : this is intended to be part of a network agent by java.
    : thanks

    For windows this can be found in the registry. One possible location is HK_CLASSES.htm and HK_CLASSES.html. I don't know if/where other OSes store their default browser.
    Note: Applets can only access the registry with special privileges.
  • ivo jonkerivo jonker Posts: 13Member
    : : hi all
    : : I want to ask : how to get the current system default browser by
    : : java code at runtime (IE,firefox,...)? and how to get its specific
    : : version ? also how to get the supported MIME type of that browser
    : : also by java code?
    : :
    : : this is intended to be part of a network agent by java.
    : : thanks
    :
    : For windows this can be found in the registry. One possible location
    : is HK_CLASSES.htm and HK_CLASSES.html. I don't know if/where other
    : OSes store their default browser.
    : Note: Applets can only access the registry with special privileges.

    I guess if you're using an applet, there should be a way to test in what browser the applet is running :)..

    Googled found this:http://www.rgagnon.com/javadetails/java-0160.html
  • zibadianzibadian Posts: 6,349Member
    : : : hi all
    : : : I want to ask : how to get the current system default browser by
    : : : java code at runtime (IE,firefox,...)? and how to get its specific
    : : : version ? also how to get the supported MIME type of that browser
    : : : also by java code?
    : : :
    : : : this is intended to be part of a network agent by java.
    : : : thanks
    : :
    : : For windows this can be found in the registry. One possible location
    : : is HK_CLASSES.htm and HK_CLASSES.html. I don't know if/where other
    : : OSes store their default browser.
    : : Note: Applets can only access the registry with special privileges.
    :
    : I guess if you're using an applet, there should be a way to test in
    : what browser the applet is running :)..
    :
    : Googled found this:http://www.rgagnon.com/javadetails/java-0160.html

    The browser, in which the applet runs, is given as one of the system properties. Here's the code to get that value:
    [code]
    String browserName = System.getProperty("browser");
    [/code]
    The question then becomes: is that browser the default browser?
Sign In or Register to comment.