Trouble using JNI

Hi everyone

I have a problem, with a class which has native functions(JNI).

The application I抦 developing, uses thread抯. At the beginning before thread starts his job, application calls a native function without problem. But when another thread calls another native function(same class) generates the next error :

java.lang.UnsatisfiedLinkError: estarEnEjecucion

at MemoriaCompartida.estarEnEjecucion(Native Method)

at MemoriaCompartida.estarEnEjecucion(MemoriaCompartida.java:72)

at Censor.timerIntervalo(Censor.java:82)

at Timer.run(Timer.java:225)

at java.lang.Thread.run(Thread.java:534)

What seems to be the problem?

Thanks a lot for your help

[715 byte] By [loganghaa] at [2007-11-27 8:48:19]
# 1

First of all,

when I use JNI, I like to put the System.loadLibrary() on a static method in the first class I know will be loaded.

like this:

static {

System.loadLibrary("Name");

}

So I know that Library was succesfuly loaded.

Anyway, I bet that your library do NOT have the method you are trying to access, or maybe is missing parameters!

Check it!

If I didn't helped, please put the call of the methods in the java file and the library, if you can.

Cya...

Message was edited by:

pbulgarelli

Message was edited by:

pbulgarelli

pbulgarellia at 2007-7-12 20:55:03 > top of Java-index,Java Essentials,Java Programming...