[fedora-java] Compiling a basic SWT app on FC4

David J. Orme djo at coconut-palm-software.com
Fri Jul 15 13:48:05 UTC 2005


Andrew Haley wrote:

>So, where is libswt-pi-gtk-3128 ?  Bizzarrely, I found it in 
>
> $HOME/.eclipse/org.eclipse.platform_3.1.0/configuration/org.eclipse.osgi/bundles/59/1/.cp/os/linux/x86/libswt-pi-gtk-3128.so
>
>(sorry, no, I have *no idea* why it's there)
>  
>
I can help here.

In 3.1, Eclipse went to a plugin packaging format where *everything* in 
a plugin winds up in a single JAR file.  (They did this to improve 
startup performance, as well as a few other things.)  Which is fine if 
you're just running .class files out of the JAR.  But obviously this 
won't work for anything that needs a native library (ie: SWT) in order 
to run.

I don't know if the solution they came up with is generic or if it only 
applies to SWT.  But what I do know is that when you run Eclipse for the 
first time, the launcher realizes that it needs those .sos somewhere in 
the file system in order for SWT to run, automatically unpacks them, and 
puts them into a configuration area.

The location of the configuration area depends on how Eclipse was 
installed and who is running it.  If it was installed in a system 
directory of a multiuser system, that directory is normally owned by 
root or Administrator and can only be written to by someone with UID=0 
or equivalent.  In this case, Eclipse has no choice but to create a copy 
of the SWT shared libraries in the account of the user who ran the 
Eclipse binary.  This is the behavior you are observing.  If, however, 
Eclipse is installed locally in a user's account, or if the user is 
(normally stupidly) running Eclipse as root or Administrator, then it 
unpacks the SWT libraries exactly once and installs them inside of its 
own install directory.

Hope this helps. :-)


Best regards,

Dave Orme

-- 
Got Java?  Use db4objects! <http://www.db4o.com>

PGP Public Key (for confidential communications):
http://www.coconut-palm-software.com/~djo/public_key.txt




More information about the fedora-devel-java-list mailing list