Select SWT library depending on OS

How can I ensure that when I distribute the JAR file that the proper SWT library (either windows, Linux or Mac version) is loaded, ready to use? This would be very helpful because then you can do one export and your application can run on any platform just like Swing applications normally.

Thank you very much

+2


a source to share


3 answers


This can be done using a loader class as described in this answer: Create Cross Platform Java SWT Application



+1


a source


You are looking for a delta package. The delta package archive contains all platform-specific snippets from the Eclipse SDK.



See http://aniefer.blogspot.com/2009/06/using-deltapack-in-eclipse-35.html

0


a source


Thank you very much for your reply. Looks like I have to distribute my application to the platform. Compared to Swing, this is a disadvantage, but I like my own widgets;)

0


a source







All Articles