The best way in an eclipse application is to use plug-in fragments. A standard eclipse project (with dlls) will have multiple fragments for all supported platforms. The fragments will only be activated if the target platforms (specified in the Platform Filter).
From the eclipse documentation (provided with a standard eclipse install)
A Platform filter is a valid LDAP string that must evaluate to true in a running system for the the plug-in to run. For example, the following filter indicates that the plug-in is designed to only run on platforms with a win32 windowing system: Eclipse-PlatformFilter: (ws=win32). If a user attempts to run Eclipse on a platform that does not meet this requirement, the plug-in will be silently ignored by the runtime.