Does the SWT provide a JAR that runs on any supported operating system?

The SWT project currently supports one distribution for each supported operating system. For instance:

  • swt-3.4.2-win32-win32-x86.zip
  • swt-3.4.2-gtk-linux-x86.zip
  • swt-3.4.2-carbon-macosx.zip

Is there a distribution that just does the right thing and trades; no matter what operating system the application is running on?

+4
source share
2 answers

No, no, and you cannot do this either from standalone SWT distributions. This is because each os / windowing system / architecture combination has its own implementation of each of the SWT classes. For example, if your code refers to org.eclipse.swt.widgets.Button, the JVM does not know if you want to implement the win32, Mac / Carbon or Mac / Cocoa class.

You could do it yourself by writing a bootloader class that computed the platform, architecture, and window system, and then loaded the right JAR. Or, the application architect is using the equinox, and he can automatically download the right SWT plugin for you. But you cannot do this with any of the unmodified SWT distributions.

+9
source

As far as I know, no: these eclipse products are always distributed on the platform

0
source

Source: https://habr.com/ru/post/895502/


All Articles