Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » UnsatisifedLinkError on RedHat 8.0 with Eclipse R2.1.1 (Motif)
UnsatisifedLinkError on RedHat 8.0 with Eclipse R2.1.1 (Motif) [message #116549] Tue, 26 August 2003 10:04 Go to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Hi, I am trying to test a SWT snippet on RedHat 8.0 with Eclipse R2.1.1
(Motif) with no success.

First of all, I added this line to the Configuration Launcher:


-Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.mot if_2.1.1/os/linux/x86


But although the JVM founds SWT native libraries, it seems something
else is missing. I am not an experto on Linux so I don't understand what
is happening. Performing a search, I fonud libXm.so.2 within
/opt/eclipse directory:

Exception in thread "main" java.lang.UnsatisfiedLinkError:
/opt/eclipse/plugins/org.eclipse.swt.motif_2.1.1/os/linux/x8 6/libswt-motif-2135.so:
libXm.so.2: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1843)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1729)
at java.lang.Runtime.loadLibrary0(Runtime.java:780)
at java.lang.System.loadLibrary(System.java:865)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 8)
at org.eclipse.swt.internal.motif.OS.<clinit>(OS.java:20)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:5 90)
at org.eclipse.swt.widgets.Display.create(Display.java:576)
at org.eclipse.swt.graphics.Device.<init>(Device.java:126)
at org.eclipse.swt.widgets.Display.<init>(Display.java:339)
at org.eclipse.swt.widgets.Display.<init>(Display.java:336)
at org.eclipse.swt.snippets.TestingBorder.main(TestingBorder.ja va:9)

I have done a search within SWT FAQ and within this forum with no luck.

Thanks in advance,

Chemi.
Re: UnsatisifedLinkError on RedHat 8.0 with Eclipse R2.1.1 (Motif) [message #116622 is a reply to message #116549] Tue, 26 August 2003 12:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Ok, now it is working. I had to execute this:

export LD_LIBRARY_PATH=/opt/eclipse

before starting Eclipse (Motif) and adding:


-Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.mot if_2.1.1/os/linux/x86

to the launcher profile.

But I don't understand these to points:

* Why adding both paths to the JVM arguments doesn't work?


-Djava.library.path=/opt/eclipse:/opt/eclipse/plugins/org.ec lipse.swt.motif_2.1.1/os/linux/x86

* Why if LD_LIBRARY_PATH variable doesn't exist in the same machine
on Eclipse (GTK) everything works fine with just:


-Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.gtk _2.1.1/os/linux/x86

* Why does Eclipse (Motif) work itself without LD_LIBRARY_PATH
variable set?

Thanks in advance,

Chemi.

Chemi wrote:

> Hi, I am trying to test a SWT snippet on RedHat 8.0 with Eclipse
> R2.1.1 (Motif) with no success.
>
> First of all, I added this line to the Configuration Launcher:
>
>
> -Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.mot if_2.1.1/os/linux/x86
>
>
> But although the JVM founds SWT native libraries, it seems something
> else is missing. I am not an experto on Linux so I don't understand
> what is happening. Performing a search, I fonud libXm.so.2 within
> /opt/eclipse directory:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError:
> /opt/eclipse/plugins/org.eclipse.swt.motif_2.1.1/os/linux/x8 6/libswt-motif-2135.so:
> libXm.so.2: cannot open shared object file: No such file or directory
> at java.lang.ClassLoader$NativeLibrary.load(Native Method)
> at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1843)
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1729)
> at java.lang.Runtime.loadLibrary0(Runtime.java:780)
> at java.lang.System.loadLibrary(System.java:865)
> at org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 8)
> at org.eclipse.swt.internal.motif.OS.<clinit>(OS.java:20)
> at org.eclipse.swt.widgets.Display.createDisplay(Display.java:5 90)
> at org.eclipse.swt.widgets.Display.create(Display.java:576)
> at org.eclipse.swt.graphics.Device.<init>(Device.java:126)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:339)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:336)
> at org.eclipse.swt.snippets.TestingBorder.main(TestingBorder.ja va:9)
>
> I have done a search within SWT FAQ and within this forum with no luck.
>
> Thanks in advance,
>
> Chemi.
>
Re: UnsatisifedLinkError on RedHat 8.0 with Eclipse R2.1.1 (Motif) [message #116637 is a reply to message #116622] Tue, 26 August 2003 12:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Chemi wrote:

> Ok, now it is working. I had to execute this:
>
> export LD_LIBRARY_PATH=/opt/eclipse
>
> before starting Eclipse (Motif) and adding:
>
>
> -Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.mot if_2.1.1/os/linux/x86
>
>
> to the launcher profile.
>
> But I don't understand these to points:
>
> * Why adding both paths to the JVM arguments doesn't work?
>
>
> -Djava.library.path=/opt/eclipse:/opt/eclipse/plugins/org.ec lipse.swt.motif_2.1.1/os/linux/x86


Answer from Peter Manahan to this point:

<<The java.library.path just tells java where to find a particular
shared object. It isn't java that is looking for the motif library it is
the native linker looking for it. The native linker doesn't know about
java.library.path.>>

> * Why if LD_LIBRARY_PATH variable doesn't exist in the same machine
> on Eclipse (GTK) everything works fine with just:
>
>
> -Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.gtk _2.1.1/os/linux/x86
>
>
> * Why does Eclipse (Motif) work itself without LD_LIBRARY_PATH
> variable set?
>
> Thanks in advance,
>
> Chemi.
Re: UnsatisifedLinkError on RedHat 8.0 with Eclipse R2.1.1 (Motif) [message #116805 is a reply to message #116637] Tue, 26 August 2003 14:45 Go to previous message
Eclipse UserFriend
Originally posted by: jmordax.terra.es

Chemi wrote:

> Chemi wrote:
>
>> Ok, now it is working. I had to execute this:
>>
>> export LD_LIBRARY_PATH=/opt/eclipse
>>
>> before starting Eclipse (Motif) and adding:
>>
>>
>> -Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.mot if_2.1.1/os/linux/x86
>>
>>
>> to the launcher profile.
>>
>> But I don't understand these to points:
>>
>> * Why adding both paths to the JVM arguments doesn't work?
>>
>>
>> -Djava.library.path=/opt/eclipse:/opt/eclipse/plugins/org.ec lipse.swt.motif_2.1.1/os/linux/x86
>
>
>
>
> Answer from Peter Manahan to this point:
>
> <<The java.library.path just tells java where to find a particular
> shared object. It isn't java that is looking for the motif library it
> is the native linker looking for it. The native linker doesn't know
> about java.library.path.>>
>
>> * Why if LD_LIBRARY_PATH variable doesn't exist in the same
>> machine on Eclipse (GTK) everything works fine with just:
>>
>>
>> -Djava.library.path=/opt/eclipse/plugins/org.eclipse.swt.gtk _2.1.1/os/linux/x86
>
>
Answer from Peter Manahan to this point:

<<By default /usr/lib:/lib is the default lookup path. The GTK libraries
are in /usr/lib >>

>> * Why does Eclipse (Motif) work itself without LD_LIBRARY_PATH
>> variable set?
>
Answer from Peter Manahan to this point:

<<It doesn't if you run it from a directory that is not where the
eclipse executable is. I think the current working directory is also
searched.
So if you are in /opt/eclipse and run ./eclipse it works. If you are in
/opt and try to run eclipse/eclipse it wouldn't work. Haven't tried it
recently though I be surprised if the behaviour has changed. >>

>> Thanks in advance,
>>
>> Chemi.
>
>
Previous Topic:Runtime class path / Debug NoClassDefFoundError
Next Topic:Get reference to parent plugin OR....
Goto Forum:
  


Current Time: Tue Jul 22 14:54:35 EDT 2025

Powered by FUDForum. Page generated in 0.05046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top