I understand that you need a way for your code to determine whether it is running on a Windows machine. Can't you use the [Java] [System] properties for that?
System