JNI Strange Behavior

Friends,

I'm receive a jni sample code for an api that I received time ago....

I compile the code and works... but if I change the name of the program, for example :

The program is called : xxxx.java and I change to : yyyy.java the program doesnt work.... I receive a error UnsatisfiedLinkError

Ps. I change all the xxxx references inside the code, and compile ok....

Why it happens ?

Thanks

jcf

[452 byte] By [jusbe] at [2007-9-26 3:57:18]
# 1

It is happening because you are effectively changing the "signature" of the native method.

The native method - subroutine - has a name that is a concatenation of the class name and the method name.

If you want to see these, run javah on the two java files, and you get two h files - one matching the old class, and one matching the new class.

bschauwe at 2007-6-29 12:49:01 > top of Java-index,Java HotSpot Virtual Machine,Specifications...