In my quest for a better written browser launcher, I found some freely available browser launcher code for 1.5.
Bare Bones Browser Launch
I've looked over all 40 lines of the code and I think it's very well written.
It will use the native getDesktop() method of Java to launch the default browser if you're running Java 6 or higher, but falls back to simple methods of determining the default "http://" URL handler for your OS if you're running a 1.5 based JVM. The author mentions that it works on Windows XP and up, but after reading some documentation I see no reason why it shouldn't work for Windows 95 and up, provided you've got at least IE3 installed (although if that's your computer, you probably can't even run KoLmafia anyway).
Currently I haven't done anything with the "preferredWebBrowser" code, but this patch in current form renders that preference useless. I figured it would be up to the devs if they want to remove it or add support for it by modifying the library.
I'm unable to test this on any Mac system, though! It looks solid to me, if anyone wants to test this out, please do. Specifically the people who are pigeon-holed into running 1.5 Java on earlier Macs.
Bare Bones Browser Launch
I've looked over all 40 lines of the code and I think it's very well written.
It will use the native getDesktop() method of Java to launch the default browser if you're running Java 6 or higher, but falls back to simple methods of determining the default "http://" URL handler for your OS if you're running a 1.5 based JVM. The author mentions that it works on Windows XP and up, but after reading some documentation I see no reason why it shouldn't work for Windows 95 and up, provided you've got at least IE3 installed (although if that's your computer, you probably can't even run KoLmafia anyway).
Currently I haven't done anything with the "preferredWebBrowser" code, but this patch in current form renders that preference useless. I figured it would be up to the devs if they want to remove it or add support for it by modifying the library.
I'm unable to test this on any Mac system, though! It looks solid to me, if anyone wants to test this out, please do. Specifically the people who are pigeon-holed into running 1.5 Java on earlier Macs.
Attachments
Last edited: