Hey devs:

While bored while perusing some of the Panel code looking for more
documentation to write, I came across an old note in AboutPanel that the
function for launching the user's web browser to bring them to
FreeCol-related sites needed to be broken out into its own class.

I created src\net\sf\freecol\common\util\OSUtils.java for this purpose.

Currently it only has two methods, both static. LaunchBrowser() is a void
that runs the command to launch the browser and GetBrowser() returns a
String[] that can be fed into LaunchBrowser(). Both are static as it seems
this class doesn't really need a state. It does not rely on any FreeCol
classes, just java.* classes for Logging and Exception handling.

It implements the Logger at FINEST to make a note of a failure to launch
the browser. I tested the update in Windows 8 and it works fine, but I have
no way to test on Linux, Unix or Mac OS.

I created a GitHub repository to store this change until there is enough
testing to make sure it works and then it can be brought back into the main
SourceForge repo.

The link to this specific commits are
and some clean up in

Additionally, this branch contains another commit which cleans up a bunch
of "==" operators that could be more strictly implemented using either
Equals() or .equals(). That commit fully passed the JUnit testing although
the change did break an AI test, so no changes to any AI files were



*Caleb R. Williams*
Freecol-developers mailing list

Reply via email to