2

How do I ensure when I distribute a JAR-file that the proper SWT-library (either the windows, the linux or mac version) is loaded an ready to use? It would be very helpful because then you can do one export and your application can run on any platform like Swing apps usually do.

Thanks a lot

f4lco
  • 3,728
  • 5
  • 28
  • 53
  • Related: http://stackoverflow.com/questions/976400/does-swt-distribute-a-jar- that-works-on-any-supported-operating-system – Adam Paynter May 19 '10 at 13:06

3 Answers3

1

This can be done with a loader class as described in this answer: Create cross platform Java SWT Application

Community
  • 1
  • 1
mchr
  • 6,161
  • 6
  • 52
  • 74
0

You looking for the delta-pack. The delta pack archive contains all the platform specific fragments from the Eclipse SDK.

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

andyczerwonka
  • 4,230
  • 5
  • 34
  • 57
0

Thanks a lot for the answer. Sounds like I have to distribute my app per platform. In comparison to Swing this is a disadvantage, but I love the native widgets ;)

f4lco
  • 3,728
  • 5
  • 28
  • 53
  • I wrote a Fantom script (http://fantom.org) a while back that takes all the files from an Eclipse multi-platform product, and creates a web start JNLP that specifies which jars you need on each platform. I can share it with you if you're interested. – qualidafial Dec 09 '10 at 22:25