getting the default browser+MIME data

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

  • : 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.
  • : : 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
  • : : : 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.

Howdy, Stranger!

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

Categories