Community
Participate
Working Groups
Hi, I am releasing a fat JAR for the customer, unfortunately, I always need to flip between swt.jar in 32x, and swt.jar in 64x. I had a look at the JAR file content, and unfortunately, the DLL are named the same for both 32x and 64x version. Also, it seems that SWT 32x is no more released :-( I supposed the bug has not much chance (I can provide a PR though...), also because SWT 32x/64x is handled by Eclipse platform (plugin fragment loaded depending on "arch"..), but who knows.
I created this workaround class for SWT 4.335 to load additional 32x libraries (in a sibling JAR file containing *_32.dll files): ``` package org.eclipse.swt.internal; import java.io.File; public class SwtCompat { private SwtCompat() { } public static void support32x() { StringBuffer message=new StringBuffer(); File dir=new File (System.getProperty ("user.home"), ".swt"); //$NON-NLS-1$ dir=new File(dir, "lib"); dir=new File(dir, "win32"); dir=new File(dir, "x86"); if(!dir.exists()) dir.mkdirs(); Library.extract(new File(dir, "swt-gdip-win32-4335.dll").getPath(), "swt-gdip-win32-4335_32.dll", message); Library.extract(new File(dir,"swt-win32-4335.dll").getPath(), "swt-win32-4335_32.dll", message); } } ```
Eclipse/SWT dropped support for 32bit in 4.10 via bug 536766.
Fine, maybe the snippet can help someone else, who knows, thanks for your answer!