I have an application which requires the use of 6 different SWT libraries (for each OS of MacOSX 32 and 64 bit, Windows 32 and 64 bit, and Linux 32 and 64 bit).
The application on which I am working I want to be cross-platform and fairly user proof (as in, it should require as little input from the user as possible to get the program to launch).
Is there a way to, based on what case with which I am dealing, tell the application "Hey, use THIS library"?
Something like
if (Platform.isMac()){
if (Platform.is64Bit()) //Use Mac 64 bit Library
else //Use Mac 32 Bit Library
//Same for Windows
//Same for Linux
Is that possible?
EDIT
I know how to determine the OS. I just need to know how to load a specific jar at run time as a dependent library of another library (say I have a library that requires SWT, I need to be able to tell THAT library WHICH SWT.jar to load based on the OS in which I am currently operating).