Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie : (Linux) SANE Scanner Library

6 views
Skip to first unread message

StrIkeR_MaN

unread,
Sep 13, 2000, 3:00:00 AM9/13/00
to
In article <8po84h$o7$1...@passat.ndh.net>,
"Dennis Sterzenbach" <djd-...@gmx.de> wrote:
> It stops with an exception saying: "Unsatisfied Link: ....loadLibrary"
> So where do I have to begin searching for the problem ??

First of all you have to include the library in your LD_LIBRARY_PATH
(Solaris, but I expect Linux to use it too). If not, try putting it in
the PATH variable (haven't done native on Linux). The error you are
getting means that the code cannot find a native library implementing
the native functions from the java classes.

Hope this helps,
StrIkeR_MaN

--
Everything comes with the time.


Sent via Deja.com http://www.deja.com/
Before you buy.

Dennis Sterzenbach

unread,
Sep 13, 2000, 11:56:42 AM9/13/00
to
Hi, I hope anybody can help me with this ...

I got the SANE Source and want to write my own Scanner Plugin for an
existing Tool running on SuSe Linux 7.0.
But there is a big problem.

I can complie the (sample) source which is actually included with the SANE
1.00 package, but i doesnt want to run, either.
Although everything needed has to be (or is meant to be) packaged with the
source it can't find the SANEJ Library.


It stops with an exception saying: "Unsatisfied Link: ....loadLibrary"
So where do I have to begin searching for the problem ??

Thanx in advance. Dennis.


Holger von Thomsen

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
> I got the SANE Source and want to write my own Scanner Plugin for an
> existing Tool running on SuSe Linux 7.0.
> But there is a big problem.
>
> I can complie the (sample) source which is actually included with the SANE
> 1.00 package, but i doesnt want to run, either.
> Although everything needed has to be (or is meant to be) packaged with the
> source it can't find the SANEJ Library.
> It stops with an exception saying: "Unsatisfied Link: ....loadLibrary"
> So where do I have to begin searching for the problem ??

Which JDK? SUN or Blackdown or any other port for Linux?
CLASSPATH Environment settings for your additional JARS?
Is there any documentation delivered with this Library?
Please post the complete Exception message so that we can determine the exact
JAR which couldnt be found.
As this SANE Library is not very wellknown in this NG (de.comp.lang.java; I
have never heard about it until today), please give us a URL, where we can
find out more about it.

Regards,
Holger


Dennis Sterzenbach

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
I use the JDK for Linux, copyed using the links on the sun homepages, I
don't even need additional Jar Files to include with the compilation ...
There is only this one missing (sanej) and at the moment I can't find any
reason for missing files.
Btw. The File can't truly be JAR ?!! If there would be missing a JAR he
couldn't compile. But the Forte CE (i use to develop) application compiles
and then starts it.
That's where it stops. Actually it is stopping during the first function
call, which tries to dynamically load/bind/open/execute (???) the "sanej".
I am still searching for the URL I got the Package from.... but here's the
full exception :

java.lang.UnsatisfiedLinkError: no sanej in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at Sane.<clinit>(Sane.java:35)
at Jscanimage.initSane(Jscanimage.java:173)
at Jscanimage.main(Jscanimage.java:109)


"Holger von Thomsen" <holger....@t-online.net> schrieb im Newsbeitrag
news:39C07E58...@t-online.net...


> > I got the SANE Source and want to write my own Scanner Plugin for an
> > existing Tool running on SuSe Linux 7.0.
> > But there is a big problem.
> >
> > I can complie the (sample) source which is actually included with the
SANE
> > 1.00 package, but i doesnt want to run, either.
> > Although everything needed has to be (or is meant to be) packaged with
the
> > source it can't find the SANEJ Library.
> > It stops with an exception saying: "Unsatisfied Link: ....loadLibrary"
> > So where do I have to begin searching for the problem ??
>

Holger von Thomsen

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
> I use the JDK for Linux, copyed using the links on the sun homepages, I
> don't even need additional Jar Files to include with the compilation ...

Ok, I meant the version of the JDK. Please check the output of 'java
-fullversion'.

> There is only this one missing (sanej) and at the moment I can't find any
> reason for missing files.
> Btw. The File can't truly be JAR ?!! If there would be missing a JAR he
> couldn't compile. But the Forte CE (i use to develop) application compiles
> and then starts it.
> That's where it stops. Actually it is stopping during the first function
> call, which tries to dynamically load/bind/open/execute (???) the "sanej".

Running inside Forte? or did you call the app directly from Linux?
If running inside Forte, it might set his own environment and therefor finds all
that it needs, but if running outside, the JDK dont know about packages which
arent included with the JDK.

> I am still searching for the URL I got the Package from.... but here's the
> full exception :
>
> java.lang.UnsatisfiedLinkError: no sanej in java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
> at java.lang.Runtime.loadLibrary0(Runtime.java:749)
> at java.lang.System.loadLibrary(System.java:820)
> at Sane.<clinit>(Sane.java:35)
> at Jscanimage.initSane(Jscanimage.java:173)
> at Jscanimage.main(Jscanimage.java:109)

I guess that Jscanimage is your Main-class.
I would suggest that you post the constructor of this class here for further
discussion.
Another way for debugging is to write a mini app with the following main-method:

public void static main(...){
System.out.println(System.getProperty("java.library.path"));
System.exit(0);
}

This will show you the path, in which it tries to look for those libs. mb you
have displaced or deleted this library accidentally.
Search your system with 'whereis sanej' to find out, if there any files with
this name anywhere in your System.

Regards,
Holger


0 new messages