How can I creating executable JAR with SWT that runs on all platforms?

executable, java, portability, swt

Solution

Look at this, there is a code sample: Create cross platform java swt application

Problem

SWT comes with a base JAR and one specific JAR per platform (Windows, Linux/32bit, Linux/64bit, Mac, AIX, ...). How can I create an executable JAR that will select the correct platform JAR at runtime? [EDIT] I was thinking to supply all platform JARs in a subdirectory and in `main()` would then modify the class loader. Has anyone already tried this?

Original source

Related problems