>AFAIK this is OS dependant.
Yes.
>I know of no way to set file associations from Java.
You can do that with webstart (1.5+)
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/syntax.html#informationassociation element: The optional association element is a hint to the JNLP client that it wishes to be registered with the operating system as the primary handler of certain extensions and a certain mime-type. The association element must have the extensions and mime-type attributes.
>I suspect Azureus sets it in their installer.
Yes.