Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Java Web Start SWT for Linux GNOME, KDE and Motif - howto

How do I write the JNLP entries to have Java Web Start load SWT under
Linux for GNOME, KDE and Motif?

Are any changes required to my program as well?

Mostly on the net I've found instructions on how to modify the Linux
installation to have the libraries installed as part of the OS, but I'd
like to have the same click and run convenience that SWT on Windows and 
Swing offers.

My Linux skills are feeble, hence I'm fumbling in the dark here. (I'm a
recent Windows programmer converted to Java trying to support SWT under
Windows, Linux and Solaris under Java Web Start.)

Here is what I have so far in my JNLP file and Java code:

linux_swt.jar - the swt.jar library renamed and signed by me.
linux_swt_lib.jar - all the native binaries for SWT 2049 jarred together
and signed by me:

 libswt-gnome-motif-2049.so
 libswt-kde-motif-2049.so
 libswt-motif-2049.so
 libXm.so - wierd, it is a couple of bytes, contains "libXm.so.2.1"
 libXm.so.2 - wierd, it is a couple of bytes, contains "libXm.so.2.1" 
 libXm.so.2.1

My program executes the following lines when running under Linux:

  System.loadLibrary("Xm");
  System.loadLibrary("swt-gnome-motif-2049");
  System.loadLibrary("swt-kde-motif-2049");
  System.loadLibrary("swt-motif-2049");

From my JNLP file:

  <resources os="Linux" arch="i386"> 
      <jar href="linux_swt.jar"/>
      <nativelib href="linux_swt_lib.jar"/>
  </resources> 
  <resources os="Windows" arch="x86"> 
      <jar href="windows_swt.jar"/>
      <nativelib href="windows_swt_lib.jar"/>
  </resources> 
 

Øyvind






Back to the top