Packages and Method Linking
Hi,
When my Java class containing the interface definitions and the DLL containing the implementation are in the same directory, everything works fine.
I put the Java class with interface defs in a package. I ran javah from the directory where the Java class file was and the header file contained names of type:
Class_MethodName, but pacakge name was not there. This did not work. The error was Unsatisfied Link Error : MethodName but the dll was loaded fine.
I ran javah from the top level of the pacakge so header file now contained names of type:
dir1_0005dir2_Class_MethodName. Even the name of the header file was dir1_0005_dir2_Header.h
But still I get the same error.
I also tried playing around with -Djava.library.path to point to the directory where the DLL was, which is the current directroy from where the program is run.
After reading around, it's my belief that the JVM is not linking method names to implementation. So...I was thinking of using RegisterNatives. How do I use this?
Thanks..
Dhruv

