I'm currently working on a java project in eclipse that uses 64-bit SWT libraries. A lot of the computers this program might be used on have 32 bit operating systems, so to avoid making a 32-bit and a 64-bit version, I want to explore dynamically loading a 32-bit or 64-bit SWT library depending on the JRE being used at the time.
I found some references to using ClassLoader, ServiceLoader, and similar objects, however I'm not sure how that would fit in with eclipse's structure, and if eclipse's structure even allows for this type of loading in the first place. Additionally, I am unsure how to check which jvm is being used inside the code, which I assume would be a prerequisite for knowing which SWT libraries would load correctly.
If you guys would be able to provide any suggestions or directions in which to focus my research, that would be great. I'm currently pretty unsure on how to proceed.
Thanks!